-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (49 loc) 路 1.36 KB
/
ci.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
48
49
50
51
52
53
54
name: CI
on:
push:
branches:
- main
pull_request:
env:
NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }}
jobs:
ci:
name: Nx Cloud - Main Job
uses: nrwl/ci/.github/workflows/nx-cloud-main.yml@v0.8.1
with:
number-of-agents: 3
init-commands: |
yarn nx-cloud start-ci-run --stop-agents-after="build" --agent-count=3
parallel-commands: |
yarn nx-cloud record -- yarn nx workspace-lint
yarn nx-cloud record -- yarn nx format:check
parallel-commands-on-agents: |
yarn nx affected --target=lint --parallel=3
yarn nx affected --target=test --parallel=3 --ci --code-coverage
yarn nx affected --target=build --parallel=3
agents:
name: Nx Cloud - Agents
uses: nrwl/ci/.github/workflows/nx-cloud-agents.yml@v0.8.1
with:
number-of-agents: 3
e2e:
name: Run e2e
needs: [ci, agents]
runs-on: ubuntu-latest
env:
NX_BASE: origin/main
NX_HEAD: HEAD
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run e2e tests
run: yarn nx affected --target=e2e --parallel=1