Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a587e51

Browse filesBrowse files
authored
Merge branch 'master' into state-operators-undefined-logs
2 parents 50f69ff + 8df99ea commit a587e51
Copy full SHA for a587e51

File tree

191 files changed

+5598
-6143
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner

191 files changed

+5598
-6143
lines changed

‎.github/workflows/build-and-test.yml

Copy file name to clipboardExpand all lines: .github/workflows/build-and-test.yml
+95-35Lines changed: 95 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -8,45 +8,105 @@ on:
88
branches: [ master ]
99
pull_request:
1010
branches: [ master ]
11+
env:
12+
node-version: 14.x
13+
NX_CLOUD_DISTRIBUTED_EXECUTION: true
14+
NX_DISTRIBUTED_TASK_EXECUTION: true
15+
NX_VERBOSE_LOGGING: true
1116

1217
jobs:
13-
build:
14-
18+
agents:
1519
runs-on: ubuntu-latest
16-
20+
name: Agent 1
21+
timeout-minutes: 20
1722
strategy:
1823
matrix:
19-
node-version: [14.x]
24+
agent: [ 1, 2, 3 ]
25+
steps:
26+
- uses: actions/checkout@v2
27+
28+
- name: Set up Node.js ${{ env.node-version }}
29+
uses: actions/setup-node@v2
30+
with:
31+
node-version: ${{ env.node-version }}
32+
33+
- uses: actions/cache@v2
34+
id: yarn-cache
35+
with:
36+
path: |
37+
node_modules
38+
~/.cache/Cypress
39+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
40+
restore-keys: |
41+
${{ runner.os }}-yarn-
2042
43+
- name: Install dependencies
44+
if: steps.yarn-cache.outputs.cache-hit != 'true'
45+
env:
46+
HUSKY_SKIP_INSTALL: 'true'
47+
run: yarn --frozen-lockfile --no-progress --non-interactive
48+
49+
- name: Start Nx Agent ${{ matrix.agent }}
50+
run: npx nx-cloud start-agent
51+
build:
52+
53+
runs-on: ubuntu-latest
2154
steps:
22-
- uses: actions/checkout@v2
23-
with:
24-
ref: ${{ github.event.pull_request.head.ref }}
25-
repository: ${{ github.event.pull_request.head.repo.full_name }}
26-
fetch-depth: 0
27-
- name: Use Node.js ${{ matrix.node-version }}
28-
uses: actions/setup-node@v1
29-
with:
30-
node-version: ${{ matrix.node-version }}
31-
- run: git fetch --no-tags --prune --depth=5 origin master
32-
33-
- uses: actions/cache@v2
34-
id: yarn-cache
35-
with:
36-
path: |
37-
node_modules
38-
~/.cache/Cypress
39-
key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
40-
restore-keys: ${{ runner.os }}-yarn
41-
42-
- name: Install dependencies
43-
if: steps.yarn-cache.outputs.cache-hit != 'true'
44-
env:
45-
HUSKY_SKIP_INSTALL: 'true'
46-
run: yarn --frozen-lockfile --no-progress --non-interactive
47-
48-
- run: yarn nx affected:lint --parallel --base=origin/master
49-
- run: yarn nx affected:test --parallel --base=origin/master
50-
- run: yarn nx run ssr-e2e:e2e --headless --base=origin/master
51-
# Do not run builds in parallel since it will cause `ngcc` compiler deadlocks.
52-
- run: yarn nx affected:build --with-deps --base=origin/master
55+
- uses: actions/checkout@v2
56+
name: Checkout [master]
57+
if: github.ref == 'refs/heads/master'
58+
with:
59+
fetch-depth: 0
60+
61+
- uses: actions/checkout@v2
62+
name: Checkout [pr]
63+
if: github.ref != 'refs/heads/master'
64+
with:
65+
ref: ${{ github.event.pull_request.head.ref }}
66+
fetch-depth: 0
67+
68+
- name: Derive appropriate SHAs for base and head for `nx affected` commands
69+
uses: nrwl/nx-set-shas@v2
70+
with:
71+
main-branch-name: 'master'
72+
73+
- name: Set up Node.js ${{ env.node-version }}
74+
uses: actions/setup-node@v2
75+
with:
76+
node-version: ${{ env.node-version }}
77+
78+
- uses: actions/cache@v2
79+
id: yarn-cache
80+
with:
81+
path: |
82+
node_modules
83+
~/.cache/Cypress
84+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
85+
restore-keys: |
86+
${{ runner.os }}-yarn-
87+
88+
- name: Install dependencies
89+
if: steps.yarn-cache.outputs.cache-hit != 'true'
90+
env:
91+
HUSKY_SKIP_INSTALL: 'true'
92+
run: yarn --frozen-lockfile --no-progress --non-interactive
93+
94+
- run: npx nx-cloud start-ci-run
95+
96+
- name: Run Affected lint
97+
run: yarn nx affected:lint --parallel --maxParallel=3
98+
99+
- name: Run Affected test
100+
run: yarn nx affected:test --parallel --maxParallel=2
101+
102+
- name: Run SSR e2e
103+
run: yarn nx run ssr-e2e:e2e --headless
104+
# don't run build in parallel, can cause dead locks
105+
- name: Run Affected build
106+
run: yarn nx affected:build --with-deps
107+
108+
- run: yarn nx-cloud stop-all-agents
109+
110+
- name: Tag main branch if all jobs succeed
111+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
112+
uses: nrwl/nx-tag-successful-ci-run@v1

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.