CI #111
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: | |
| pull_request: | |
| branches: ['main'] | |
| workflow_dispatch: | |
| jobs: | |
| lint-and-test: | |
| runs-on: ubuntu-latest | |
| container: node:lts-jod | |
| services: | |
| mongo: | |
| image: mongo | |
| ports: | |
| - 27017:27017 | |
| options: >- | |
| --health-cmd mongo | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| --name mongo | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v5 | |
| - name: Setup PNPM | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| cache: 'pnpm' | |
| node-version-file: '.nvmrc' | |
| - name: Generate Environment | |
| run: ./scripts/generate-env.sh | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Init Mongo | |
| run: | | |
| docker run mongo mongosh --eval "rs.initiate({_id: 'rs0', members: [{_id: 0, host: 'localhost:27017'}]});" | |
| - name: Install Playwright | |
| run: pnpm --filter "@opendatacapture/e2e" exec playwright install --with-deps | |
| - name: Lint | |
| run: pnpm lint | |
| - name: Unit Tests | |
| run: pnpm test | |
| - name: End-to-End Tests | |
| run: pnpm --filter "@opendatacapture/e2e" test |