-
Notifications
You must be signed in to change notification settings - Fork 19
41 lines (33 loc) · 1.01 KB
/
unit-tests.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
name: Run unit tests
on: [pull_request, workflow_dispatch]
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-
- name: Populate .env file
uses: SpicyPizza/[email protected]
with:
envkey_PUBLIC_NETWORK: 5
enkey_GQL_URL: https://drips-api-goerli.up.railway.app
envkey_GQL_URL: https://drips-api-mainnet.up.railway.app
envkey_GQL_ACCESS_TOKEN: ${{ secrets.GQL_ACCESS_TOKEN }}
- name: Install dependencies
run: npm ci
- name: Build GQL types
run: npm run build:graphql
- name: Svelte Kit Sync
run: npx svelte-kit sync
- name: Run tests
run: npm run test:unit