Repository navigation
43 lines (43 loc) · 1.49 KB
/
Copy pathci.yaml
File metadata and controls
43 lines (43 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: CI
on:
pull_request:
branches: ['main']
workflow_dispatch:
permissions:
contents: read
jobs:
lint-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v7
- name: Setup PNPM
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
- name: Setup Node.js
uses: actions/setup-node@v7
with:
cache: 'pnpm'
node-version-file: '.nvmrc'
- name: Generate Environment
run: ./scripts/generate-env.sh
- name: Configure Git
run: |
# necessary for the git commands used for release info
git config --global --add safe.directory /__w/OpenDataCapture/OpenDataCapture
- name: Install Dependencies
run: pnpm install --frozen-lockfile
# Run lint and unit tests before the (occasionally flaky) Playwright install so those results
# aren't blocked by a hung browser download.
- name: Lint
run: pnpm lint
- name: Unit Tests
run: pnpm test:coverage
- name: Install Playwright
# Cap the step so a hang fails fast instead of hitting the 6h job limit, skip the interactive
# apt prompt, and install only the browsers the e2e suite uses.
timeout-minutes: 10
env:
DEBIAN_FRONTEND: noninteractive
run: pnpm --filter "@opendatacapture/testing" exec playwright install --with-deps chromium firefox
- name: End-to-End Tests
run: pnpm test:e2e