-
Notifications
You must be signed in to change notification settings - Fork 47
44 lines (38 loc) · 1.88 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
name: CI
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
jobs:
main:
name: Nx Cloud - Main Job
uses: nrwl/ci/.github/workflows/[email protected]
with:
init-commands: |
npx nx-cloud record -- ./scripts/install.sh --enable-redis
npx nx-cloud record -- mkdir -p /home/runner/.config/solana/
npx nx-cloud record -- source ./scripts/devenv.sh
npx nx-cloud record --solana-keygen new --no-bip39-passphrase -o /home/runner/.config/solana/id.json
# NOTE: Here we are using the special `nx-cloud record` command to ensure that any commands we run that do not go through the cloud task runner natively
# (i.e. anything that starts with `nx run`/`nx run-many`/`nx affected --target`), are still captured in the Nx Cloud UI and Github App comment for
# easier troubleshooting. See more here: https://nx.dev/nx-cloud/set-up/record-commands#recording-non-nx-commands
parallel-commands: |
npx nx-cloud record -- npx nx format:check
parallel-commands-on-agents: |
source ./scripts/devenv.sh && NX_CLOUD_DISTRIBUTED_EXECUTION=false npx nx affected --target=lint --parallel=3
source ./scripts/devenv.sh && npx nx affected --target=build --parallel=3
source ./scripts/devenv.sh && npx nx affected --target=test --parallel=3
agents:
name: Nx Cloud - Agents
uses: nrwl/ci/.github/workflows/[email protected]
with:
number-of-agents: 3
install-commands: |
npx nx-cloud record -- ./scripts/install.sh --enable-redis
npx nx-cloud record -- mkdir -p /home/runner/.config/solana/
npx nx-cloud record -- source ./scripts/devenv.sh
npx nx-cloud record --solana-keygen new --no-bip39-passphrase -o /home/runner/.config/solana/id.json