Skip to content

Commit 8bcfb3e

Browse files
committed
Added gh action for test
1 parent 4f717ac commit 8bcfb3e

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/pr-checks.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: PR Checks
2+
3+
on:
4+
pull_request_review:
5+
types: [submitted]
6+
7+
jobs:
8+
test:
9+
if: github.event.review && (github.event.review.state == 'approved' || contains(github.event.review.body, '/check'))
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v1
14+
with:
15+
node-version: '12.18.1'
16+
- name: Cache node modules
17+
uses: actions/cache@v1
18+
with:
19+
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
20+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
21+
restore-keys: |
22+
${{ runner.os }}-build-${{ env.cache-name }}-
23+
${{ runner.os }}-build-
24+
${{ runner.os }}-
25+
- name: install
26+
run: |
27+
npm install
28+
- name: rust:test
29+
run: |
30+
npm run rust:test
31+
- name: rust:build-nodejs
32+
run: |
33+
npm run rust:build-nodejs

0 commit comments

Comments
 (0)