ci(deps): bump the actions group across 1 directory with 3 updates #268
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: | |
| push: | |
| branches: [main, develop] | |
| paths-ignore: | |
| - "**.md" | |
| - "docs/**" | |
| - "LICENSE" | |
| - ".github/PULL_REQUEST_TEMPLATE.md" | |
| pull_request: | |
| branches: [main, develop] | |
| paths-ignore: | |
| - "**.md" | |
| - "docs/**" | |
| - "LICENSE" | |
| - ".github/PULL_REQUEST_TEMPLATE.md" | |
| # Cancel redundant runs: only keep the latest for each PR/branch | |
| concurrency: | |
| group: ci-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| name: Lint (ESLint + TypeScript) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22" | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Lint | |
| run: npm run lint | |
| build: | |
| name: Build & Verify (Node ${{ matrix.node }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node: ["20", "22"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Node.js ${{ matrix.node }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| - name: Verify build output | |
| run: | | |
| test -f dist/index.js || (echo "dist/index.js missing" && exit 1) | |
| test -f dist/modules/transport.js || (echo "transport module missing" && exit 1) | |
| test -f dist/modules/weather.js || (echo "weather module missing" && exit 1) | |
| test -f dist/modules/geodata.js || (echo "geodata module missing" && exit 1) | |
| test -f dist/modules/companies.js || (echo "companies module missing" && exit 1) | |
| unit-tests: | |
| name: Unit Tests | |
| runs-on: ubuntu-latest | |
| needs: [lint, build] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Node.js 22 | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22" | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| - name: Unit & Protocol Tests | |
| run: npm run test:coverage | |
| - name: Upload coverage report | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: coverage-report | |
| path: coverage/ | |
| retention-days: 7 | |
| integration-tests: | |
| name: Integration Tests (Live Swiss APIs) | |
| runs-on: ubuntu-latest | |
| needs: [lint, build] | |
| # Only run integration tests on PRs — push events already passed PR checks | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Node.js 22 | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22" | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| - name: Integration Tests | |
| run: npm run test:integration | |
| timeout-minutes: 15 | |
| security-audit: | |
| name: Security Audit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Node.js 22 | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22" | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: npm audit | |
| run: npm audit --audit-level=moderate | |
| continue-on-error: true |