Skip to content

Commit bbd3d8c

Browse files
committed
Run all tests on push to master, run only changed files' tests on PRs
1 parent 09e4826 commit bbd3d8c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/Ci.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v3
15+
1516
- uses: actions/setup-node@v3
1617
with:
1718
node-version: 16
@@ -20,8 +21,13 @@ jobs:
2021
- name: 📦 Install dependencies
2122
run: npm ci
2223

23-
- name: 🧪 Run tests
24-
run: npm run test-changed
24+
- name: 🧪 Run all tests
25+
if: ${{ github.event_name == 'push' }}
26+
run: npm run test
27+
28+
- name: 🧪 Run tests for changed files only
29+
if: ${{ github.event_name == 'pull_request' }}
30+
run: npm run test
2531

2632
- name: 💄 Code style
2733
run: npm run style

0 commit comments

Comments
 (0)