forked from rx-angular/rx-angular
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (63 loc) · 2.26 KB
/
build-and-test.yml
File metadata and controls
85 lines (63 loc) · 2.26 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: rx-angular CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
NX_CLOUD_DISTRIBUTED_EXECUTION: true
NX_DISTRIBUTED_TASK_EXECUTION: true
NX_VERBOSE_LOGGING: false
jobs:
agents:
runs-on: ubuntu-latest
name: Agent 1
timeout-minutes: 20
strategy:
matrix:
agent: [1, 2, 3]
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/setup
- name: Start Nx Agent ${{ matrix.agent }}
run: yarn nx-cloud start-agent
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/setup
- run: yarn nx-cloud start-ci-run
- name: Run Affected lint
run: yarn nx affected:lint --parallel --maxParallel=3
- name: Run Affected test
run: yarn nx affected:test --parallel --maxParallel=3
- name: Run Affected e2e
run: yarn nx affected:e2e
# don't run build in parallel, can cause dead locks
- name: Run Affected build
run: yarn nx affected:build --parallel=false
- run: yarn nx-cloud stop-all-agents
build-docs:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs: [build]
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/setup
# @Notice: temporary skip Nx cloud for this job as it's hanging indefinitely in the CI.
# - run: yarn nx-cloud start-ci-run
- run: NX_CLOUD_DISTRIBUTED_EXECUTION=false yarn nx run-many --projects=state,template,cdk --target=build-docs --parallel --maxParallel=3
- run: NX_CLOUD_DISTRIBUTED_EXECUTION=false yarn nx build demos --prod
# @Notice: temporary skip Nx cloud for this job as it's hanging indefinitely in the CI.
# - run: yarn nx-cloud stop-all-agents
- uses: EndBug/add-and-commit@v4
with:
add: 'docs/*'
author_name: Github Action
message: 'chore(docs): update GitHub pages'
# Name of the branch to use, if different from the one that triggered the workflow
# Default: the branch that triggered the workflow (from GITHUB_REF)
ref: 'github-pages'
env:
# This is necessary in order to push a commit to the repo
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}