ci(main): Test run on github agents #120
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: | |
permissions: | |
actions: read | |
contents: read | |
env: | |
PNPM_VERSION: 9.12.1 | |
NODE_VERSION: 20 | |
NX_POWERPACK_LICENSE: ${{ secrets.NX_POWERPACK_LICENSE }} | |
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} | |
NX_PERF_LOGGING: '${{ secrets.ACTIONS_STEP_DEBUG || false }}' | |
NX_VERBOSE_LOGGING: '${{ secrets.ACTIONS_STEP_DEBUG || false }}' | |
jobs: | |
main: | |
name: Nx Cloud - Main Job | |
uses: nrwl/ci/.github/workflows/nx-cloud-main.yml@v0.15 | |
with: | |
main-branch-name: main | |
number-of-agents: 3 | |
init-commands: | | |
pnpm exec nx-cloud start-ci-run --stop-agents-after="e2e" --agent-count=3 | |
parallel-commands: | | |
pnpm exec nx-cloud record -- pnpm exec nx format:check | |
parallel-commands-on-agents: | | |
pnpm exec nx affected --target lint build test e2e | |
agents: | |
name: Nx Cloud - Agents | |
uses: nrwl/ci/.github/workflows/nx-cloud-agents.yml@v0.15 | |
with: | |
number-of-agents: 3 | |
# main: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# with: | |
# fetch-depth: 0 | |
# | |
# - uses: pnpm/action-setup@v4 | |
# with: | |
# version: ${{ env.PNPM_VERSION }} | |
# run_install: false | |
# | |
# - uses: actions/setup-node@v3 | |
# with: | |
# node-version: ${{ env.NODE_VERSION }} | |
# cache: 'pnpm' | |
# | |
# - name: Cache node_modules | |
# id: cache-modules | |
# uses: actions/cache@v4 | |
# with: | |
# lookup-only: true | |
# path: '**/node_modules' | |
# key: ${{ runner.os }}-modules-${{ env.NODE_VERSION }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
# | |
# - name: Install packages | |
# # if: steps.cache-modules.outputs.cache-hit != 'true' | |
# run: pnpm install --frozen-lockfile | |
# | |
# - uses: nrwl/nx-set-shas@v4 | |
# | |
# - run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after=e2e | |
## - run: pnpm nx-cloud record -- nx format:check | |
# - run: pnpm nx affected -t lint test build e2e |