Skip to content

testing Nx distributed builds #25

testing Nx distributed builds

testing Nx distributed builds #25

Workflow file for this run

name: Distributed test
on:
push:
branches:
- main
pull_request:
env:
NX_CLOUD_DISTRIBUTED_EXECUTION: true
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
# keep this number in sync with the number of agents in the matrix below
NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT: 16
jobs:
agents:
name: Nx Cloud Agents
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
matrix:
# keep this array in sync with the number of agents in
# NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT above
agent: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2.2.4
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- name: Start Nx Agent ${{ matrix.agent }}
run: pnpm nx-cloud start-agent
env:
NX_AGENT_NAME: ${{matrix.agent}}
pr:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
- uses: nrwl/nx-set-shas@v3
- uses: pnpm/action-setup@v2.2.4
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm nx-cloud start-ci-run
- run: pnpm nx run-many -t test lint build e2e build-storybooks
- run: pnpm nx-cloud stop-all-agents