-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Note we are not commenting or showing coverage right now
- Loading branch information
1 parent
8524d83
commit ce4846f
Showing
1 changed file
with
63 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
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 |