performs "clean install" rather than "install" with npm #19
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 | ||
paths: | ||
- '.github/workflows/node.yml' # Trigger workflow when it's modified | ||
- '**/*.?(c|m)@(js|ts)?(x)' # ?(Common|Module) @(JavaScript|TypeScript) ?(XML) files | ||
- '**/*.vue' # For single-file components that contain a script block | ||
paths-ignore: | ||
- '**/*.md' # Ignore markdown files (and their constituent fenced code blocks) | ||
- 'docs/**' # Ignore docs folder | ||
pull_request: | ||
branches: | ||
- integration | ||
paths: | ||
- '.github/workflows/node.yml' # Trigger workflow when it's modified | ||
- '**/*.?(c|m)@(js|ts)?(x)' # ?(Common|Module) @(JavaScript|TypeScript) ?(XML) files | ||
- '**/*.vue' # For single-file components that contain a script block | ||
paths-ignore: | ||
- '**/*.md' # Ignore markdown files (and their constituent fenced code blocks) | ||
- 'docs/**' # Ignore docs folder | ||
jobs: | ||
lint: | ||
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 (which includes linters) | ||
run: npm clean-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 "::notice::Enable lint-on-save in your editor for automatic fixes" | ||
echo "::notice::Run \`npm run lint\` in your dev environment for details about issues that aren't automatically fixable" | ||
exit 1 |