Created
October 26, 2022 15:43
-
-
Save pjlamb12/9d52c12b7004559cf5066ce7511cbef1 to your computer and use it in GitHub Desktop.
Nx CI GitHub Actions Workflow
This file contains hidden or 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: Nx Affected CI Linting/Tests/Build | |
on: | |
pull_request: | |
branches: [master] | |
env: | |
NX_BRANCH: ${{ github.event.number }} | |
NX_RUN_GROUP: ${{ github.run_id }} | |
jobs: | |
main: | |
name: Nx Cloud - Main Job | |
uses: nrwl/ci/.github/workflows/[email protected] | |
with: | |
main-branch-name: master | |
number-of-agents: 3 | |
init-commands: | | |
npx nx-cloud start-ci-run --stop-agents-after="build" --agent-count=3 | |
parallel-commands: | | |
npx nx-cloud record -- npx nx workspace-lint | |
npx nx-cloud record -- npx nx format:check | |
parallel-commands-on-agents: | | |
npx nx affected --target=lint --parallel=3 | |
npx nx affected --target=test --parallel=3 --ci --code-coverage | |
npx nx affected --target=build --parallel=3 | |
npx nx affected --target=e2e --parallel=3 --record --key=${{ secrets.CYPRESS_RECORD_KEY }} --headed --browser chrome | |
agents: | |
name: Nx Cloud - Agents | |
uses: nrwl/ci/.github/workflows/[email protected] | |
with: | |
number-of-agents: 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment