-
Notifications
You must be signed in to change notification settings - Fork 28
58 lines (54 loc) · 1.47 KB
/
check-spl-name-service.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Check spl-name-service
on:
push:
branches: [main]
paths:
- 'js/**'
pull_request:
branches: [main]
paths:
- 'js/**'
defaults:
run:
working-directory: ./js
jobs:
prepare-dependencies:
name: Prepare local deps
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node
# Use Node version specified in Volta config inside package.json
uses: volta-cli/action@v4
- name: Get npm cache directory
shell: bash
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v3
id: npm-cache
with:
path: |
**/node_modules
${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Use cache or install dependencies
if: steps.prepare-env.outputs.cache-hit != 'true'
run: npm ci
- name: Make envfile
uses: SpicyPizza/[email protected]
with:
envkey_RPC_URL: ${{ secrets.RPC_URL }}
test:
name: Test source code
needs: prepare-dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: ./.github/actions/prepare-local-env
- name: Test source code
run: npm run test