ci: adds linter workflow #12
Workflow file for this run
This file contains hidden or 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
name: Node | |
on: | |
push: | |
branches: [ "integration" ] | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: [ "integration" ] | |
schedule: | |
- cron: '19 1 * * 1' | |
jobs: | |
run-eslint: | |
runs-on: ubuntu-latest | |
name: ESLint via package.json | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
cache: 'npm' | |
- name: Install all dependencies, include linters | |
run: npm install | |
- name: Run the linter | |
id: lint | |
run: npx eslint . --max-warnings 0 --cache | |
continue-on-error: true | |
- name: Intercept linter failure | |
if: steps.lint.outcome == 'failure' | |
run: | | |
echo "::error::Linting failed!" | |
echo "::notice::Enable lint-on-save in your editor for automatic fixes" | |
echo "::notice::Run \`npm run lint\` for details about issues that aren't automatically fixable" |