1name: CI
2
3on:
4 pull_request:
5 push:
6 branches:
7 - main
8
9jobs:
10 check:
11 name: Checks
12 runs-on: ubuntu-latest
13 timeout-minutes: 10
14 steps:
15 - name: Checkout Repo
16 uses: actions/checkout@v4
17 with:
18 fetch-depth: 0
19
20 - name: Setup Node
21 uses: actions/setup-node@v4
22 with:
23 node-version: 20
24
25 - name: Setup pnpm
26 uses: pnpm/action-setup@v3
27 with:
28 version: 8.6.1
29 run_install: false
30
31 - name: Get pnpm store directory
32 id: pnpm-store
33 run: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
34
35 - name: Use pnpm store
36 uses: actions/cache@v4
37 id: pnpm-cache
38 with:
39 path: ${{ steps.pnpm-store.outputs.pnpm_cache_dir }}
40 key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
41 restore-keys: |
42 ${{ runner.os }}-pnpm-
43
44 - name: Install Dependencies
45 run: pnpm install --frozen-lockfile --prefer-offline
46
47 - name: Build
48 run: pnpm --filter @0no-co/graphqlsp run build
49
50 - name: Test
51 run: pnpm run test:e2e