-
-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (45 loc) · 1.26 KB
/
pr.yml
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
44
45
46
47
name: CI
on:
pull_request:
branches:
- main
jobs:
main:
name: Nx Cloud - Main Job
uses: nrwl/ci/.github/workflows/[email protected]
with:
main-branch-name: main
number-of-agents: 3
init-commands: |
npx nx-cloud start-ci-run --stop-agents-after="build" --agent-count=3
parallel-commands: |
npx nx-cloud record -- npx nx format:check
parallel-commands-on-agents: |
npx nx affected --target=lint --parallel=3
npx nx affected --target=test --parallel=3 --ci --code-coverage
npx nx affected --target=build --parallel=3
e2e:
name: Nx Cloud - E2E Job
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- run: |
npm ci
- name: Docker Compose
run: |
docker-compose -f compose.test.yml up -d
npx -y wait-on http://localhost:3000/ping
- name: Run E2E tests
run: |
npx nx e2e api-e2e
- name: Docker Compose down
run: |
docker-compose -f compose.test.yml down
agents:
name: Nx Cloud - Agents
uses: nrwl/ci/.github/workflows/[email protected]
with:
number-of-agents: 3