Skip to content

Commit dbfef4b

Browse files
committed
updated test and build action
1 parent 0bb2625 commit dbfef4b

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

.github/workflows/test-and-build.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,33 @@
1-
name: Test and Build
1+
name: Test Suite
22

33
on:
4-
workflow_dispatch:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
# The branches below must be a subset of the branches above
8+
branches: [main]
59

610
jobs:
711
test-and-build:
812
runs-on: ubuntu-latest
913
strategy:
1014
matrix:
11-
node-version: [16.x, 14.x]
15+
node-version: [16.x]
1216
steps:
1317
- name: Checkout code
1418
uses: actions/checkout@v2
1519
with:
16-
ref: ${{ github.event.pull_request.head.sha }}
20+
ref: ${{ if github.event_name == 'pull_request' }}${{ github.event.pull_request.head.sha }}${{ else }}${{ github.ref }}${{ endif }}
1721
fetch-depth: 0
1822

1923
- name: Use Node.js ${{ matrix.node-version }}
2024
uses: actions/setup-node@v2
2125
with:
2226
node-version: ${{ matrix.node-version }}
2327

28+
- name: Linting
29+
run: npm run eslint
30+
2431
- name: Install dependencies
2532
run: npm install
2633

0 commit comments

Comments
 (0)