Build(deps-dev): Bump the development group across 1 directory with 3 updates #11
Workflow file for this run
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] | |
| pull_request: | |
| workflow_dispatch: | |
| # A new push to a PR makes the in-flight run irrelevant. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| NODE_VERSION: '22.x' | |
| jobs: | |
| verify: | |
| name: Types, lint, unit (Node ${{ matrix.node }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # Lowest version `engines` claims to support, and the version the | |
| # project is developed on. These ship different npm majors, which | |
| # resolve `package-lock.json` differently — testing both stops a | |
| # lockfile that only installs on one of them from being committed. | |
| node: ['22.6', '26.x'] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run typecheck | |
| - run: npm run lint | |
| - run: npm run test | |
| integration: | |
| name: Integration tests | |
| runs-on: ubuntu-latest | |
| # Credentials match .env.test, which the test setup reads, so nothing here | |
| # needs overriding. They are throwaway values for a container that only | |
| # exists for the length of this job. | |
| services: | |
| postgres: | |
| image: postgres:17-alpine | |
| env: | |
| POSTGRES_USER: draftledger | |
| POSTGRES_PASSWORD: draftledger | |
| POSTGRES_DB: draftledger_dev | |
| ports: ['5432:5432'] | |
| options: >- | |
| --health-cmd "pg_isready -U draftledger" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 10 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run db:migrate | |
| - run: npm run test:integration | |
| e2e: | |
| name: End-to-end tests | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:17-alpine | |
| env: | |
| POSTGRES_USER: draftledger | |
| POSTGRES_PASSWORD: draftledger | |
| POSTGRES_DB: draftledger_dev | |
| ports: ['5432:5432'] | |
| options: >- | |
| --health-cmd "pg_isready -U draftledger" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 10 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: npm | |
| - run: npm ci | |
| - run: npx playwright install --with-deps chromium | |
| - run: npm run db:migrate | |
| - run: npm run db:seed | |
| # playwright.config.ts builds and starts the app itself via `webServer`. | |
| - run: npm run test:e2e | |
| - uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: playwright-report | |
| path: | | |
| playwright-report/ | |
| test-results/ | |
| retention-days: 7 | |
| docker: | |
| name: Docker image builds | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: docker/setup-buildx-action@v4 | |
| - uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| push: false | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |