Merge pull request #128 from srleecode/18.0.3 #236
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: Continous Integration | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
env: | |
NX_CLOUD_DISTRIBUTED_EXECUTION: true | |
jobs: | |
master: | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name != 'pull_request' }} | |
steps: | |
- uses: actions/checkout@v4 | |
name: Checkout [master] | |
with: | |
fetch-depth: 0 | |
- name: Derive appropriate SHAs for base and head for `nx affected` commands | |
uses: nrwl/nx-set-shas@v4 | |
with: | |
main-branch-name: 'master' | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 'latest' | |
- run: npm ci | |
- run: npx nx-cloud start-ci-run | |
- run: npm run build | |
- run: npm run lint | |
- run: npm ruun test | |
- run: npm run e2e | |
- run: npx nx-cloud stop-all-agents | |
pr: | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'pull_request' }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request_target.head.ref }} | |
fetch-depth: 0 | |
- name: Derive appropriate SHAs for base and head for `nx affected` commands | |
uses: nrwl/nx-set-shas@v4 | |
with: | |
main-branch-name: 'master' | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 'latest' | |
- run: npm ci | |
- run: npx nx-cloud start-ci-run | |
- run: npm run build | |
- run: npm run lint | |
- run: npm run test | |
- run: npm run e2e | |
- run: npx nx-cloud stop-all-agents | |
agents: | |
runs-on: ubuntu-latest | |
name: Agent 1 | |
timeout-minutes: 30 | |
strategy: | |
matrix: | |
agent: [1, 2, 3] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 'latest' | |
- run: npm ci | |
- name: Start Nx Agent ${{ matrix.agent }} | |
run: npx nx-cloud start-agent |