Skip to content

Commit 49783ac

Browse files
committed
ci(config): Add verification
1 parent 50b51fe commit 49783ac

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/pr-validate.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Pull Request
2+
3+
on: [pull_request_target] #To ensure better security and avoid running on forks
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
version: [14, 16, 18]
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Use Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: ${{ matrix.version }}
18+
cache: 'npm'
19+
20+
- name: Cache Node.js modules
21+
uses: actions/cache@v4
22+
with:
23+
path: node_modules
24+
key: ${{ runner.os }}-node-${{ matrix.version }}-${{ hashFiles('package-lock.json') }}
25+
restore-keys: |
26+
${{ runner.os }}-node-${{ matrix.version }}-
27+
28+
- name: Installing dependencies
29+
run: npm ci
30+
31+
- name: Running tests
32+
run: npm run test
33+
34+
- name: Running lint
35+
run: npm run lint
36+
37+
- name: Running typecheck
38+
run: npm run typecheck

0 commit comments

Comments
 (0)