Automated checks (Merged to main) #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: Automated checks (Merged to main) | |
on: | |
push: | |
branches: [ "main" ] | |
schedule: | |
- cron: '21 00 * * 2' | |
jobs: | |
linting: | |
name: Lint project | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
security-events: write | |
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Restore dependencies | |
run: npm ci | |
- name: setup sarif formatter | |
run: npm install --no-save @microsoft/eslint-formatter-sarif@3.1.0 | |
- name: Run ESLint | |
env: | |
SARIF_ESLINT_IGNORE_SUPPRESSED: "true" | |
run: npm run lint -- . | |
--config .eslintrc.json | |
--ext .js,.jsx,.ts,.tsx | |
--format @microsoft/eslint-formatter-sarif | |
--output-file eslint-results.sarif | |
continue-on-error: true | |
- name: Upload analysis results to GitHub | |
uses: github/codeql-action/upload-sarif@v3 | |
with: | |
sarif_file: eslint-results.sarif | |
wait-for-processing: true | |
tests: | |
name: Automated Tests | |
runs-on: ubuntu-latest | |
permissions: | |
checks: write | |
pull-requests: write | |
contents: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Restore dependencies | |
run: npm ci | |
- name: Run Tests | |
run: npm test |