chore: nx cloud #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | | |
./scripts/install.sh --enable-redis | |
mkdir -p /home/runner/.config/solana/ | |
source ./scripts/devenv.sh | |
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: | | |
./scripts/install.sh --enable-redis | |
mkdir -p /home/runner/.config/solana/ | |
source ./scripts/devenv.sh | |
solana-keygen new --no-bip39-passphrase -o /home/runner/.config/solana/id.json | |