forked from mirrors/bookwyrm
Tweak Github Actions:
- Rename some jobs for consistency. - Add workflows path to trigger lint when updating workflows. - Simplify frontend actions to speed up process and reduce dependencies.
This commit is contained in:
parent
53f03457cc
commit
99fd5c4e17
2 changed files with 13 additions and 14 deletions
21
.github/workflows/linters-frontend.yaml
vendored
21
.github/workflows/linters-frontend.yaml
vendored
|
@ -1,30 +1,29 @@
|
|||
# @url https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
||||
name: Frontend Linters
|
||||
name: Lint Frontend
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, ci ]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'static/**'
|
||||
pull_request:
|
||||
branches: [ main, ci ]
|
||||
|
||||
jobs:
|
||||
linters:
|
||||
name: linters
|
||||
lint:
|
||||
name: Lint with stylelint and ESLint.
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: stylelinter
|
||||
uses: actions-hub/stylelint@v1.1.3
|
||||
env:
|
||||
PATTERN: "*.css"
|
||||
- name: Install modules
|
||||
run: yarn
|
||||
|
||||
- name: Run stylelint
|
||||
run: yarn stylelint **/static/**/*.css --report-needless-disables --report-invalid-scope-disables
|
||||
|
||||
- name: Run ESLint
|
||||
uses: stefanoeb/eslint-action@1.0.2
|
||||
with:
|
||||
files:
|
||||
- 'bookwyrm/static/js/**'
|
||||
run: yarn eslint . --ext .js,.jsx,.ts,.tsx
|
||||
|
|
6
.github/workflows/linters-global.yaml
vendored
6
.github/workflows/linters-global.yaml
vendored
|
@ -1,5 +1,5 @@
|
|||
# @url https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
||||
name: Lint Project
|
||||
name: Lint project globally
|
||||
|
||||
on:
|
||||
push:
|
||||
|
@ -8,8 +8,8 @@ on:
|
|||
branches: [ main, ci ]
|
||||
|
||||
jobs:
|
||||
linters:
|
||||
name: linters
|
||||
lint:
|
||||
name: Lint with EditorConfig.
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
|
|
Loading…
Reference in a new issue