-
Notifications
You must be signed in to change notification settings - Fork 472
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
012999e
commit 12a609f
Showing
2 changed files
with
24 additions
and
23 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
name: Linting | ||
name: JavaScript and CSS Linting | ||
on: | ||
pull_request: | ||
push: | ||
branches: [trunk] | ||
jobs: | ||
Setup: | ||
name: Setup Caches | ||
name: Setup for Jobs | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Cache node modules | ||
|
@@ -38,9 +39,28 @@ jobs: | |
${{ runner.OS }}- | ||
- name: Install Node Dependencies | ||
run: npm install | ||
- uses: bradennapier/[email protected] | ||
- if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }} | ||
name: Run ESLint | ||
run: npm run lint:js | ||
- if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }} | ||
name: Save Code Linting Report JSON | ||
run: npm run lint:js:report | ||
# Continue to the next step even if this fails | ||
continue-on-error: true | ||
- if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }} | ||
name: Upload ESLint report | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: eslint_report.json | ||
path: eslint_report.json | ||
- if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }} | ||
name: Annotate Code Linting Results | ||
uses: ataylorme/[email protected] | ||
with: | ||
repo-token: '${{ secrets.GITHUB_TOKEN }}' | ||
report-json: 'eslint_report.json' | ||
|
||
csslint: | ||
stylelint: | ||
name: Lint CSS | ||
needs: Setup | ||
runs-on: ubuntu-latest | ||
|