GeezerVison is showing github.com — chore: ci updates (#3523) · lerna/lerna@70de43c
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: .github/workflows/ci.yml +25-13Lines changed: 25 additions & 13 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 16 | 16 | NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} | 17 | 17 | NX_CLOUD_DISTRIBUTED_EXECUTION: true | 18 | 18 | NX_BRANCH: ${{ github.event.number || github.ref_name }} | 19 | | - NX_VERBOSE_LOGGING: false | | 19 | + NX_VERBOSE_LOGGING: true | 20 | 20 |
| 21 | 21 | jobs: | 22 | 22 | main: | @@ -27,23 +27,33 @@ jobs: | 27 | 27 | with: | 28 | 28 | fetch-depth: 0 | 29 | 29 |
| 30 | | - - name: Derive appropriate SHAs for base and head for `nx affected` commands | 31 | | - uses: nrwl/nx-set-shas@v3 | | 30 | + - uses: nrwl/nx-set-shas@v3 | | 31 | + | | 32 | + - name: Set NX_RUN_GROUP | | 33 | + shell: bash | | 34 | + run: echo "NX_RUN_GROUP=$GITHUB_RUN_ID-$GITHUB_RUN_ATTEMPT-linux" >> $GITHUB_ENV | | 35 | + | | 36 | + - name: Log NX_RUN_GROUP | | 37 | + shell: bash | | 38 | + run: echo "NX_RUN_GROUP is ${{ env.NX_RUN_GROUP }}" | 32 | 39 |
| 33 | 40 | - name: Install primary node version (see volta config in package.json) and dependencies | 34 | 41 | uses: ./.github/actions/install-node-and-dependencies | 35 | 42 |
| | 43 | + - run: npx nx run-many -t build --parallel=3 --no-dte --skip-nx-cache | | 44 | + | 36 | 45 | - name: Run parallel distributed tasks | 37 | 46 | uses: jameshenry/parallel-bash-commands@v1 | 38 | 47 | with: | 39 | 48 | cmd1: npx nx-cloud record -- npx nx format:check | 40 | 49 | cmd2: npx nx-cloud record -- npx nx workspace-lint | | 50 | + # cmd3: npx nx run-many -t build --parallel=3 | 41 | 51 | cmd3: npx nx run-many -t lint --parallel=3 | 42 | 52 | cmd4: npx nx run-many -t test --parallel=3 --ci --maxWorkers=2 | 43 | 53 | cmd5: npx nx run integration:integration --ci --maxWorkers=2 | 44 | 54 |
| 45 | 55 | # e2e tests for everything except the primary task runner | 46 | | - - run: PUBLISHED_VERSION=999.9.9-e2e.0 npx nx run-many --target=run-e2e-tests-process --parallel=1 | | 56 | + - run: PUBLISHED_VERSION=999.9.9-e2e.0 npx nx run-many --t e2e --parallel=1 | 47 | 57 |
| 48 | 58 | - name: Stop all running agents for Nx Run Group ${{ env.NX_RUN_GROUP }} | 49 | 59 | # It's important that we always run this step, otherwise in the case of any failures in preceding non-Nx steps, the agents will keep running and waste billable minutes | | 59 | 69 | steps: | 60 | 70 | - uses: actions/checkout@v3 | 61 | 71 |
| | 72 | + - name: Set NX_RUN_GROUP | | 73 | + shell: bash | | 74 | + run: echo "NX_RUN_GROUP=$GITHUB_RUN_ID-$GITHUB_RUN_ATTEMPT-linux" >> $GITHUB_ENV | | 75 | + | | 76 | + - name: Log NX_RUN_GROUP | | 77 | + shell: bash | | 78 | + run: echo "NX_RUN_GROUP is ${{ env.NX_RUN_GROUP }}" | | 79 | + | 62 | 80 | - name: Configure git metadata | 63 | 81 | run: | | 64 | 82 | | @@ -67,14 +85,11 @@ jobs: | 67 | 85 | - name: Install primary node version (see volta config in package.json) and dependencies | 68 | 86 | uses: ./.github/actions/install-node-and-dependencies | 69 | 87 |
| 70 | | - - run: npm run e2e-start-local-registry | 71 | | - | 72 | | - - run: NX_VERBOSE_LOGGING=true PUBLISHED_VERSION=999.9.9-e2e.0 npm run e2e-build-package-publish | 73 | | - | 74 | 88 | - name: Start Nx Agent ${{ matrix.agent }} | 75 | 89 | run: npx nx-cloud start-agent | 76 | 90 | env: | 77 | 91 | NX_AGENT_NAME: ${{ matrix.agent }} | | 92 | + NX_RUN_GROUP: ${{ env.NX_RUN_GROUP }} | 78 | 93 |
| 79 | 94 | windows-main: | 80 | 95 | name: Nx Cloud - Windows Main Job | | 83 | 98 | LERNA_OS_TYPE: windows | 84 | 99 | steps: | 85 | 100 | - uses: actions/checkout@v3 | 86 | | - with: | 87 | | - fetch-depth: 0 | 88 | | - | 89 | | - - name: Derive appropriate SHAs for base and head for `nx affected` commands | 90 | | - uses: nrwl/nx-set-shas@v3 | 91 | 101 |
| 92 | 102 | - name: Set NX_RUN_GROUP | 93 | 103 | shell: bash | @@ -150,6 +160,8 @@ jobs: | 150 | 160 | - name: Install primary node version (see volta config in package.json) and dependencies | 151 | 161 | uses: ./.github/actions/install-node-and-dependencies | 152 | 162 |
| | 163 | + - run: npx nx reset | | 164 | + | 153 | 165 | - name: Start Nx Agent ${{ matrix.agent }} | 154 | 166 | run: npx nx-cloud start-agent | 155 | 167 | env: | |
Collapse file Copy file name to clipboardExpand all lines: e2e/changed/project.json +3-38Lines changed: 3 additions & 38 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 4 | 4 | "implicitDependencies": ["lerna", "commands-changed"], | 5 | 5 | "tags": [], | 6 | 6 | "targets": { | 7 | | - "e2e": { | 8 | | - "executor": "nx:run-commands", | 9 | | - "options": { | 10 | | - "commands": [ | 11 | | - { | 12 | | - "command": "npm run e2e-start-local-registry" | 13 | | - }, | 14 | | - { | 15 | | - "command": "npm run e2e-build-package-publish" | 16 | | - }, | 17 | | - { | 18 | | - "command": "E2E_ROOT=$(npx ts-node tools/scripts/set-e2e-root.ts) nx run-e2e-tests e2e-changed" | 19 | | - } | 20 | | - ], | 21 | | - "parallel": false | 22 | | - } | 23 | | - }, | 24 | | - "run-e2e-tests-process": { | 25 | | - "executor": "nx:run-commands", | 26 | | - "options": { | 27 | | - "commands": [ | 28 | | - { | 29 | | - "command": "E2E_ROOT=$(npx ts-node tools/scripts/set-e2e-root.ts) nx run-e2e-tests e2e-changed", | 30 | | - "description": "This additional wrapper target exists so that we can ensure that the e2e tests run in a dedicated process with enough memory" | 31 | | - } | 32 | | - ], | 33 | | - "parallel": false | 34 | | - } | 35 | | - }, | 36 | | - "run-e2e-tests": { | 37 | | - "executor": "@nrwl/jest:jest", | 38 | | - "options": { | 39 | | - "jestConfig": "e2e/changed/jest.config.ts", | 40 | | - "passWithNoTests": true, | 41 | | - "runInBand": true | 42 | | - }, | 43 | | - "outputs": ["{workspaceRoot}/coverage/e2e/changed"] | 44 | | - }, | | 7 | + "e2e": {}, | | 8 | + "run-e2e-tests-process": {}, | | 9 | + "run-e2e-tests": {}, | 45 | 10 | "lint": { | 46 | 11 | "executor": "@nrwl/linter:eslint", | 47 | 12 | "outputs": ["{options.outputFile}"], | |
Collapse file Copy file name to clipboardExpand all lines: e2e/clean/project.json +3-38Lines changed: 3 additions & 38 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 4 | 4 | "implicitDependencies": ["lerna", "commands-clean"], | 5 | 5 | "tags": [], | 6 | 6 | "targets": { | 7 | | - "e2e": { | 8 | | - "executor": "nx:run-commands", | 9 | | - "options": { | 10 | | - "commands": [ | 11 | | - { | 12 | | - "command": "npm run e2e-start-local-registry" | 13 | | - }, | 14 | | - { | 15 | | - "command": "npm run e2e-build-package-publish" | 16 | | - }, | 17 | | - { | 18 | | - "command": "E2E_ROOT=$(npx ts-node tools/scripts/set-e2e-root.ts) nx run-e2e-tests e2e-clean" | 19 | | - } | 20 | | - ], | 21 | | - "parallel": false | 22 | | - } | 23 | | - }, | 24 | | - "run-e2e-tests-process": { | 25 | | - "executor": "nx:run-commands", | 26 | | - "options": { | 27 | | - "commands": [ | 28 | | - { | 29 | | - "command": "E2E_ROOT=$(npx ts-node tools/scripts/set-e2e-root.ts) nx run-e2e-tests e2e-clean", | 30 | | - "description": "This additional wrapper target exists so that we can ensure that the e2e tests run in a dedicated process with enough memory" | 31 | | - } | 32 | | - ], | 33 | | - "parallel": false | 34 | | - } | 35 | | - }, | 36 | | - "run-e2e-tests": { | 37 | | - "executor": "@nrwl/jest:jest", | 38 | | - "options": { | 39 | | - "jestConfig": "e2e/clean/jest.config.ts", | 40 | | - "passWithNoTests": true, | 41 | | - "runInBand": true | 42 | | - }, | 43 | | - "outputs": ["{workspaceRoot}/coverage/e2e/clean"] | 44 | | - }, | | 7 | + "e2e": {}, | | 8 | + "run-e2e-tests-process": {}, | | 9 | + "run-e2e-tests": {}, | 45 | 10 | "lint": { | 46 | 11 | "executor": "@nrwl/linter:eslint", | 47 | 12 | "outputs": ["{options.outputFile}"], | |
Collapse file Copy file name to clipboardExpand all lines: e2e/create/project.json +3-38Lines changed: 3 additions & 38 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 4 | 4 | "implicitDependencies": ["lerna", "commands-create"], | 5 | 5 | "tags": [], | 6 | 6 | "targets": { | 7 | | - "e2e": { | 8 | | - "executor": "nx:run-commands", | 9 | | - "options": { | 10 | | - "commands": [ | 11 | | - { | 12 | | - "command": "npm run e2e-start-local-registry" | 13 | | - }, | 14 | | - { | 15 | | - "command": "npm run e2e-build-package-publish" | 16 | | - }, | 17 | | - { | 18 | | - "command": "E2E_ROOT=$(npx ts-node tools/scripts/set-e2e-root.ts) nx run-e2e-tests e2e-create" | 19 | | - } | 20 | | - ], | 21 | | - "parallel": false | 22 | | - } | 23 | | - }, | 24 | | - "run-e2e-tests-process": { | 25 | | - "executor": "nx:run-commands", | 26 | | - "options": { | 27 | | - "commands": [ | 28 | | - { | 29 | | - "command": "E2E_ROOT=$(npx ts-node tools/scripts/set-e2e-root.ts) nx run-e2e-tests e2e-create", | 30 | | - "description": "This additional wrapper target exists so that we can ensure that the e2e tests run in a dedicated process with enough memory" | 31 | | - } | 32 | | - ], | 33 | | - "parallel": false | 34 | | - } | 35 | | - }, | 36 | | - "run-e2e-tests": { | 37 | | - "executor": "@nrwl/jest:jest", | 38 | | - "options": { | 39 | | - "jestConfig": "e2e/create/jest.config.ts", | 40 | | - "passWithNoTests": true, | 41 | | - "runInBand": true | 42 | | - }, | 43 | | - "outputs": ["{workspaceRoot}/coverage/e2e/create"] | 44 | | - }, | | 7 | + "e2e": {}, | | 8 | + "run-e2e-tests-process": {}, | | 9 | + "run-e2e-tests": {}, | 45 | 10 | "lint": { | 46 | 11 | "executor": "@nrwl/linter:eslint", | 47 | 12 | "outputs": ["{options.outputFile}"], | |
Collapse file Copy file name to clipboardExpand all lines: e2e/diff/project.json +3-38Lines changed: 3 additions & 38 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 4 | 4 | "implicitDependencies": ["lerna", "commands-diff"], | 5 | 5 | "tags": [], | 6 | 6 | "targets": { | 7 | | - "e2e": { | 8 | | - "executor": "nx:run-commands", | 9 | | - "options": { | 10 | | - "commands": [ | 11 | | - { | 12 | | - "command": "npm run e2e-start-local-registry" | 13 | | - }, | 14 | | - { | 15 | | - "command": "npm run e2e-build-package-publish" | 16 | | - }, | 17 | | - { | 18 | | - "command": "E2E_ROOT=$(npx ts-node tools/scripts/set-e2e-root.ts) nx run-e2e-tests e2e-diff" | 19 | | - } | 20 | | - ], | 21 | | - "parallel": false | 22 | | - } | 23 | | - }, | 24 | | - "run-e2e-tests-process": { | 25 | | - "executor": "nx:run-commands", | 26 | | - "options": { | 27 | | - "commands": [ | 28 | | - { | 29 | | - "command": "E2E_ROOT=$(npx ts-node tools/scripts/set-e2e-root.ts) nx run-e2e-tests e2e-diff", | 30 | | - "description": "This additional wrapper target exists so that we can ensure that the e2e tests run in a dedicated process with enough memory" | 31 | | - } | 32 | | - ], | 33 | | - "parallel": false | 34 | | - } | 35 | | - }, | 36 | | - "run-e2e-tests": { | 37 | | - "executor": "@nrwl/jest:jest", | 38 | | - "options": { | 39 | | - "jestConfig": "e2e/diff/jest.config.ts", | 40 | | - "passWithNoTests": true, | 41 | | - "runInBand": true | 42 | | - }, | 43 | | - "outputs": ["{workspaceRoot}/coverage/e2e/diff"] | 44 | | - }, | | 7 | + "e2e": {}, | | 8 | + "run-e2e-tests-process": {}, | | 9 | + "run-e2e-tests": {}, | 45 | 10 | "lint": { | 46 | 11 | "executor": "@nrwl/linter:eslint", | 47 | 12 | "outputs": ["{options.outputFile}"], | |
Collapse file Copy file name to clipboardExpand all lines: e2e/exec/project.json +3-38Lines changed: 3 additions & 38 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 4 | 4 | "implicitDependencies": ["lerna", "commands-exec"], | 5 | 5 | "tags": [], | 6 | 6 | "targets": { | 7 | | - "e2e": { | 8 | | - "executor": "nx:run-commands", | 9 | | - "options": { | 10 | | - "commands": [ | 11 | | - { | 12 | | - "command": "npm run e2e-start-local-registry" | 13 | | - }, | 14 | | - { | 15 | | - "command": "npm run e2e-build-package-publish" | 16 | | - }, | 17 | | - { | 18 | | - "command": "E2E_ROOT=$(npx ts-node tools/scripts/set-e2e-root.ts) nx run-e2e-tests e2e-exec" | 19 | | - } | 20 | | - ], | 21 | | - "parallel": false | 22 | | - } | 23 | | - }, | 24 | | - "run-e2e-tests-process": { | 25 | | - "executor": "nx:run-commands", | 26 | | - "options": { | 27 | | - "commands": [ | 28 | | - { | 29 | | - "command": "E2E_ROOT=$(npx ts-node tools/scripts/set-e2e-root.ts) nx run-e2e-tests e2e-exec", | 30 | | - "description": "This additional wrapper target exists so that we can ensure that the e2e tests run in a dedicated process with enough memory" | 31 | | - } | 32 | | - ], | 33 | | - "parallel": false | 34 | | - } | 35 | | - }, | 36 | | - "run-e2e-tests": { | 37 | | - "executor": "@nrwl/jest:jest", | 38 | | - "options": { | 39 | | - "jestConfig": "e2e/exec/jest.config.ts", | 40 | | - "passWithNoTests": true, | 41 | | - "runInBand": true | 42 | | - }, | 43 | | - "outputs": ["{workspaceRoot}/coverage/e2e/exec"] | 44 | | - }, | | 7 | + "e2e": {}, | | 8 | + "run-e2e-tests-process": {}, | | 9 | + "run-e2e-tests": {}, | 45 | 10 | "lint": { | 46 | 11 | "executor": "@nrwl/linter:eslint", | 47 | 12 | "outputs": ["{options.outputFile}"], | |
Collapse file Copy file name to clipboardExpand all lines: e2e/info/project.json +3-38Lines changed: 3 additions & 38 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 4 | 4 | "implicitDependencies": ["lerna", "commands-info"], | 5 | 5 | "tags": [], | 6 | 6 | "targets": { | 7 | | - "e2e": { | 8 | | - "executor": "nx:run-commands", | 9 | | - "options": { | 10 | | - "commands": [ | 11 | | - { | 12 | | - "command": "npm run e2e-start-local-registry" | 13 | | - }, | 14 | | - { | 15 | | - "command": "npm run e2e-build-package-publish" | 16 | | - }, | 17 | | - { | 18 | | - "command": "E2E_ROOT=$(npx ts-node tools/scripts/set-e2e-root.ts) nx run-e2e-tests e2e-info" | 19 | | - } | 20 | | - ], | 21 | | - "parallel": false | 22 | | - } | 23 | | - }, | 24 | | - "run-e2e-tests-process": { | 25 | | - "executor": "nx:run-commands", | 26 | | - "options": { | 27 | | - "commands": [ | 28 | | - { | 29 | | - "command": "E2E_ROOT=$(npx ts-node tools/scripts/set-e2e-root.ts) nx run-e2e-tests e2e-info", | 30 | | - "description": "This additional wrapper target exists so that we can ensure that the e2e tests run in a dedicated process with enough memory" | 31 | | - } | 32 | | - ], | 33 | | - "parallel": false | 34 | | - } | 35 | | - }, | 36 | | - "run-e2e-tests": { | 37 | | - "executor": "@nrwl/jest:jest", | 38 | | - "options": { | 39 | | - "jestConfig": "e2e/info/jest.config.ts", | 40 | | - "passWithNoTests": true, | 41 | | - "runInBand": true | 42 | | - }, | 43 | | - "outputs": ["{workspaceRoot}/coverage/e2e/info"] | 44 | | - }, | | 7 | + "e2e": {}, | | 8 | + "run-e2e-tests-process": {}, | | 9 | + "run-e2e-tests": {}, | 45 | 10 | "lint": { | 46 | 11 | "executor": "@nrwl/linter:eslint", | 47 | 12 | "outputs": ["{options.outputFile}"], | |
|