Merge pull request #256 from OpenDTU-App/enable-build-cache #545
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 | |
- develop | |
pull_request: | |
branches: [ '*' ] | |
jobs: | |
test: | |
name: Run Tests | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: write | |
checks: write | |
pull-requests: write | |
security-events: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
cache: 'yarn' | |
- name: Install node modules | |
run: | | |
yarn install --immutable --check-cache | |
- name: Run ESLint | |
continue-on-error: true | |
run: | | |
yarn lint --max-warnings=0 --format @microsoft/eslint-formatter-sarif --output-file eslint-results.sarif | |
- name: Upload ESLint analysis results to GitHub | |
uses: github/codeql-action/upload-sarif@v3 | |
with: | |
sarif_file: eslint-results.sarif | |
wait-for-processing: true | |
- name: Run tests | |
uses: willcaul/jest-github-action@v4 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
test-command: "yarn test" |