Skip to content

Commit

Permalink
Use nx affected command in ci (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjlangley authored Jan 4, 2024
1 parent df7b976 commit 1a5d3e1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,9 @@ jobs:
node_modules
~/.cache/Cypress
key: npm-dependencies-${{ hashFiles('package-lock.json') }}
- run: npx nx build cart
# https://github.com/marketplace/actions/nx-set-shas
- 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 affected -t lint,test,build --parallel=3 --configuration=ci
- run: npx nx affected -t e2e --parallel=1
5 changes: 4 additions & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@
},
"namedInputs": {
"default": ["{projectRoot}/**/*", "sharedGlobals"],
"sharedGlobals": ["{workspaceRoot}/babel.config.json"],
"sharedGlobals": [
"{workspaceRoot}/babel.config.json",
"{workspaceRoot}/.github/workflows/ci.yml"
],
"production": [
"default",
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
Expand Down

0 comments on commit 1a5d3e1

Please sign in to comment.