Skip to content

Commit c13b03f

Browse files
committed
ci: run tests on every branch
1 parent 2561740 commit c13b03f

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.github/workflows/test.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
name: Node.js CI
22

3-
on:
4-
push:
5-
branches: [main]
6-
pull_request:
7-
branches: ['**']
3+
on: [push, pull_request]
84

95
jobs:
106
lint:
117
name: Lint
128
runs-on: ubuntu-latest
9+
if: >
10+
github.event_name == 'push' ||
11+
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
1312
steps:
1413
- uses: actions/checkout@v3
1514
- name: Use Node.js 20
@@ -25,6 +24,9 @@ jobs:
2524
unit-tests:
2625
name: Unit tests
2726
runs-on: ubuntu-latest
27+
if: >
28+
github.event_name == 'push' ||
29+
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
2830
strategy:
2931
matrix:
3032
node-version: [18, 20]
@@ -47,6 +49,9 @@ jobs:
4749
node-version: [18, 20]
4850
os: [ubuntu-latest, macos-latest, windows-2019]
4951
runs-on: ${{ matrix.os }}
52+
if: >
53+
github.event_name == 'push' ||
54+
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
5055
defaults:
5156
run:
5257
shell: bash

0 commit comments

Comments
 (0)