Skip to content

Commit

Permalink
fix: affected in GH action
Browse files Browse the repository at this point in the history
  • Loading branch information
voznik committed Dec 30, 2023
1 parent 91723ce commit 723a90d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ jobs:
run: echo This event is a pull request that was opened.
#
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
#
- name: Build on Node.js # ${{ matrix.node-version }}
Expand All @@ -57,7 +58,10 @@ jobs:
- name: Install
run: npm ci
- name: Lint & Test
run: npm run lint && npm run test
# This line is needed for nx affected to work when CI is running on a PR
uses: nrwl/nx-set-shas@v3
- run: git branch --track master origin/master
- run: npm run lint:all && npm run test
env:
CI: true
# Save coverage report in Coveralls
Expand Down
3 changes: 3 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"libsDir": "packages",
"projectNameAndRootFormat": "as-provided"
},
"affected": {
"defaultBase": "origin/master"
},
"targetDefaults": {
"build": {
"dependsOn": ["^build"],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"build:standalone:sourcemaps": "nx run standalone:build --configuration=production --sourceMap=true --statsJson",
"test": "nx run rxdb:test --ci --run-in-band --parallel --pass-with-no-tests --collectCoverage && npm run test:merge",
"test:merge": "./node_modules/.bin/lcov-result-merger 'coverage/packages/*.lcov' coverage/lcov.info",
"lint": "nx affected --base=master --head=HEAD -t lint --parallel --verbose",
"lint:all": "nx affected --base=master --head=HEAD -t lint --parallel --verbose",
"lint:fix": "node --max_old_space_size=8000 ./node_modules/.bin/eslint -- . --fix",
"e2e": "ng e2e",
"affected": "nx affected",
Expand Down

0 comments on commit 723a90d

Please sign in to comment.