WIP: Try out Parallel Linting #8
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
name: Lint Code | ||
on: | ||
push: | ||
branches: ["**"] | ||
pull_request: | ||
branches: [main] | ||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: "npm" | ||
- name: "Install Dependencies" | ||
run: npm ci | ||
- name: "Check Formatting" | ||
id: prettier | ||
run: npx prettier --ignore-path .gitignore --check . | ||
continue-on-error: true | ||
- name: "Run ESLint" | ||
id: eslint | ||
run: npx eslint --ignore-path .gitignore . | ||
continue-on-error: true | ||
- name: "Validate TypeScript Types" | ||
id: typescript | ||
run: npx tsc --noEmit | ||
continue-on-error: true | ||
- name: "Verify That All Checks Succeeded" | ||
if: steps.prettier.outcome != "success" || steps.eslint.outcome != "success" || steps.ts.outcome != "success" | ||
Check failure on line 32 in .github/workflows/lint-code.yml
|
||
run: | | ||
echo "1 or more checks failed" | ||
exit 1 |