Repository navigation
Merge pull request #50 from mrc-ide/new-mamba-estimint #210
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: client test workflow | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - "releases/*" | |
| paths: | |
| - "client/**" | |
| pull_request: | |
| branches: | |
| - "*" | |
| paths: | |
| - "client/**" | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: client | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Set up Node.js 22.x | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: 22.x | |
| cache: "npm" | |
| cache-dependency-path: client/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run format + lint checks | |
| run: npm run lint | |
| - name: check svelte-check | |
| run: npm run check | |
| - name: Install Playwright Browsers | |
| run: npx playwright install --with-deps | |
| - name: Run unit tests | |
| run: npm run test:unit:coverage | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| slug: mrc-ide/mint-v2 | |
| fail_ci_if_error: true | |
| e2e-tests: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: client | |
| strategy: | |
| matrix: | |
| node-version: [22.x] | |
| env: | |
| REDIS_URL: redis://localhost:6379 | |
| PUBLIC_API_URL: http://localhost:8000 | |
| steps: | |
| - name: Free Disk Space (Ubuntu) | |
| uses: jlumbroso/free-disk-space@main | |
| with: | |
| tool-cache: false | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Set up Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: "npm" | |
| cache-dependency-path: client/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Start dependencies | |
| run: ./scripts/run_dependencies.sh | |
| - name: Install Playwright Browsers | |
| run: npx playwright install --with-deps | |
| - name: Run Playwright tests | |
| run: npm run test:e2e | |
| - name: Stop dependencies | |
| if: ${{ always() }} | |
| run: ./scripts/stop_dependencies.sh |