-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from bcgov/dev
Add eslint github action workflow
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# ESLint is a tool for identifying and reporting on patterns | ||
# found in ECMAScript/JavaScript code. | ||
# More details at https://github.com/eslint/eslint | ||
# and https://eslint.org | ||
|
||
name: ESLint | ||
|
||
on: | ||
push: | ||
branches: '*' | ||
pull_request: | ||
branches: ['main', 'dev'] | ||
|
||
jobs: | ||
eslint: | ||
name: Run eslint scanning | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
security-events: write | ||
actions: read | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install ESLint | ||
run: | | ||
npm install [email protected] | ||
- name: Run ESLint | ||
run: npm run lint:pipeline | ||
continue-on-error: true | ||
|
||
- name: Upload ESLint report | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: eslint-report | ||
path: eslint-report.html | ||
|
||
- name: Display ESLint report link | ||
run: echo "::set-output name=eslint-report::${{ steps.upload.outputs.artifact_path }}" |
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