Merge pull request #50 from IT2810-H26/ci-cd-docs #22
This file contains hidden or 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: CI | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| # Cancel outdated runs on the same branch to save runner time and energy. | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| checks: | |
| runs-on: self-hosted | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| # npm ci installs exactly what package-lock.json says, so CI matches | |
| # what we run locally. | |
| - run: npm ci | |
| - run: npm run lint | |
| - run: npm run format:check | |
| - run: npm test | |
| - run: npm run build |