/ .github / workflows / unit-tests.yml
unit-tests.yml
 1  name: Run unit tests
 2  on:
 3    workflow_dispatch:
 4    pull_request:
 5  
 6  jobs:
 7    unit-tests:
 8      runs-on: ubuntu-latest
 9      steps:
10        - name: Check out code
11          uses: actions/checkout@v2
12  
13        - uses: actions/setup-node@v3
14          with:
15            node-version: 24
16            cache: 'npm'
17  
18        - name: Cache dependencies
19          uses: actions/cache@v4
20          with:
21            path: ~/.npm
22            key: npm-${{ hashFiles('package-lock.json') }}
23            restore-keys: npm-
24  
25        - name: Install dependencies
26          run: npm ci
27  
28        - name: Build GQL types
29          run: PUBLIC_GQL_URL=https://gql-api.drips.network/ npm run gql:build
30  
31        - name: Svelte Kit Sync
32          run: npx svelte-kit sync
33  
34        - name: Run tests
35          run: npm run test:unit