-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: updated nx CI workflow and node engine version
* bumped node engine version in all package.json and CI files * manually specified node-version in CI workflow * bumped node-version for nx agents * added PR-specific workflow file * removed nx agent distribution * updated dep install command * ran nx format * re-added nx-plus/docusaurus * re-added nx agent distribution * removed nx agent distribution in favor of no agents * updated main CI workflow file * ran nx format
- Loading branch information
Showing
14 changed files
with
133 additions
and
58 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,65 @@ | ||
name: CI | ||
name: Main CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
# pull_request: | ||
|
||
jobs: | ||
main: | ||
name: Nx Cloud - Main Job | ||
uses: nrwl/ci/.github/workflows/[email protected] | ||
secrets: | ||
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
with: | ||
main-branch-name: main | ||
number-of-agents: 3 | ||
init-commands: | | ||
yarn nx-cloud start-ci-run --stop-agents-after="build" --agent-count=3 | ||
parallel-commands: | | ||
yarn nx-cloud record -- yarn nx format:check | ||
parallel-commands-on-agents: | | ||
yarn nx lint harbor-master | ||
yarn nx test harbor-master --ci --codeCoverage | ||
yarn nx build harbor-master | ||
artifacts-path: | | ||
dist | ||
coverage | ||
package.json | ||
artifacts-name: dist-and-coverage-artifacts | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
cache: 'npm' | ||
|
||
- run: npx nx-cloud start-ci-run | ||
- run: yarn install --frozen-lockfile | ||
|
||
- uses: nrwl/nx-set-shas@v3 | ||
|
||
- run: npx nx-cloud record -- nx format:check | ||
- run: npx nx run-many -t lint test build --no-agents | ||
|
||
# main: | ||
# name: Nx Cloud - Main Job | ||
# uses: nrwl/ci/.github/workflows/[email protected] | ||
# secrets: | ||
# NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} | ||
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
# with: | ||
# main-branch-name: main | ||
# number-of-agents: 3 | ||
# init-commands: | | ||
# yarn nx-cloud start-ci-run --stop-agents-after="build" --agent-count=3 | ||
# parallel-commands: | | ||
# yarn nx-cloud record -- yarn nx format:check | ||
# parallel-commands-on-agents: | | ||
# yarn nx lint harbor-master | ||
# yarn nx test harbor-master --ci --codeCoverage | ||
# yarn nx build harbor-master | ||
# artifacts-path: | | ||
# dist | ||
# coverage | ||
# package.json | ||
# artifacts-name: dist-and-coverage-artifacts | ||
# node-version: '20' | ||
|
||
agents: | ||
name: Nx Cloud - Agents | ||
uses: nrwl/ci/.github/workflows/[email protected] | ||
secrets: | ||
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
with: | ||
number-of-agents: 3 | ||
# agents: | ||
# name: Nx Cloud - Agents | ||
# uses: nrwl/ci/.github/workflows/[email protected] | ||
# secrets: | ||
# NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} | ||
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
# with: | ||
# number-of-agents: 3 | ||
# node-version: '20' | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
|
@@ -55,7 +77,7 @@ jobs: | |
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
node-version: '20' | ||
|
||
- run: yarn install --frozen-lockfile | ||
|
||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Pull Request CI | ||
|
||
on: | ||
pull_request: | ||
|
||
# Needed for nx-set-shas when run on the main branch | ||
permissions: | ||
actions: read | ||
contents: read | ||
|
||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
cache: 'npm' | ||
|
||
- run: npx nx-cloud start-ci-run | ||
- run: yarn install --frozen-lockfile | ||
|
||
- uses: nrwl/nx-set-shas@v3 | ||
# This line is needed for nx affected to work when CI is running on a PR | ||
- run: git branch --track main origin/main | ||
|
||
- run: npx nx-cloud record -- nx format:check | ||
- run: npx nx affected -t lint test build --no-agents |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,7 @@ Thumbs.db | |
# nx | ||
migrations.json | ||
.nx/cache | ||
nx-cloud.env | ||
|
||
# Generated Docusaurus files | ||
.docusaurus/ | ||
|
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,5 @@ | |
"description": "A directory where the project is placed" | ||
} | ||
}, | ||
"required": [ | ||
"name" | ||
] | ||
"required": ["name"] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3388,6 +3388,17 @@ | |
dependencies: | ||
"@nx/devkit" "18.0.4" | ||
|
||
"@nrwl/devkit@^15.0.0": | ||
version "15.9.7" | ||
resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-15.9.7.tgz#14d19ec82ff4209c12147a97f1cdea05d8f6c087" | ||
integrity sha512-Sb7Am2TMT8AVq8e+vxOlk3AtOA2M0qCmhBzoM1OJbdHaPKc0g0UgSnWRml1kPGg5qfPk72tWclLoZJ5/ut0vTg== | ||
dependencies: | ||
ejs "^3.1.7" | ||
ignore "^5.0.4" | ||
semver "7.5.4" | ||
tmp "~0.2.1" | ||
tslib "^2.3.0" | ||
|
||
"@nrwl/[email protected]": | ||
version "18.0.4" | ||
resolved "https://registry.yarnpkg.com/@nrwl/eslint-plugin-nx/-/eslint-plugin-nx-18.0.4.tgz#b9cef2b6f0075a17e93f11f99301b0c44f3e06d3" | ||
|
@@ -3431,6 +3442,13 @@ | |
dependencies: | ||
"@nx/workspace" "18.0.4" | ||
|
||
"@nx-plus/docusaurus@^15.0.0-rc.0": | ||
version "15.0.0-rc.0" | ||
resolved "https://registry.yarnpkg.com/@nx-plus/docusaurus/-/docusaurus-15.0.0-rc.0.tgz#3233637ed3678d7be491ee3c2f9fb3c6ca407f25" | ||
integrity sha512-GmoYHKljQJvJLSYhWBe+huStwJbm+RbK+lC2j2sA+ZCUdkUo+P2Yv5oQGbqWU4jXclYe8pOP/qVFJs3j3Zjw/Q== | ||
dependencies: | ||
"@nrwl/devkit" "^15.0.0" | ||
|
||
"@nx/[email protected]": | ||
version "18.0.4" | ||
resolved "https://registry.yarnpkg.com/@nx/devkit/-/devkit-18.0.4.tgz#fec28139ef5d078933c5f1b5a7e0a585672dbdd6" | ||
|
@@ -13762,6 +13780,13 @@ semver-truncate@^2.0.0: | |
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" | ||
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== | ||
|
||
[email protected]: | ||
version "7.5.4" | ||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" | ||
integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== | ||
dependencies: | ||
lru-cache "^6.0.0" | ||
|
||
[email protected], semver@^7.5.2, semver@^7.5.3, semver@^7.5.4: | ||
version "7.6.0" | ||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d" | ||
|