updated ci #21
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: Continuous integration | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
jobs: | |
eslint: | |
name: ESLint | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
permissions: | |
security-events: write | |
actions: read | |
contents: read | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: package.json | |
cache: npm | |
- name: Install dependencies | |
run: npm i --silent | |
- name: Run ESLint | |
run: npm run lint:sarif | |
continue-on-error: true | |
- name: Upload ESLint analysis results to GitHub | |
uses: github/codeql-action/upload-sarif@v2 | |
with: | |
sarif_file: eslint-results.sarif | |
wait-for-processing: true | |
category: ESLint | |
validate: | |
name: Validate build & test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: package.json | |
cache: npm | |
- name: Install dependencies | |
run: npm i --silent | |
- name: Build | |
run: npm run build | |
- name: Test | |
run: npm run test |