diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e6ca6d1..18d6c71 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,4 +32,9 @@ jobs: node_modules ~/.cache/Cypress key: npm-dependencies-${{ hashFiles('package-lock.json') }} - - run: npx nx build cart \ No newline at end of file + # 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 \ No newline at end of file diff --git a/nx.json b/nx.json index 89fb439..121ec35 100644 --- a/nx.json +++ b/nx.json @@ -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)",