Mirror: The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
1name: CI
2
3on:
4 pull_request:
5 pull_request_review:
6 types: [submitted, edited]
7 branches: changeset-release/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: 18
24
25 - name: Setup pnpm
26 uses: pnpm/action-setup@v3
27 with:
28 version: 9
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: |
40 ~/.cache/Cypress
41 ${{ steps.pnpm-store.outputs.pnpm_cache_dir }}
42 key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
43 restore-keys: |
44 ${{ runner.os }}-pnpm-
45
46 - name: Install Dependencies
47 run: pnpm install --frozen-lockfile --prefer-offline
48
49 - name: TypeScript
50 run: pnpm run check
51
52 - name: Linting
53 run: pnpm run lint
54
55 - name: Unit Tests
56 run: pnpm run test
57
58 - name: Check for slow types
59 run: pnpm jsr:dryrun
60
61 react-e2e:
62 name: React E2E
63 runs-on: ubuntu-latest
64 timeout-minutes: 10
65 steps:
66 - name: Checkout Repo
67 uses: actions/checkout@v4
68 with:
69 fetch-depth: 0
70
71 - name: Setup Node
72 uses: actions/setup-node@v4
73 with:
74 node-version: 18
75
76 - name: Setup pnpm
77 uses: pnpm/action-setup@v3
78 with:
79 version: 9
80 run_install: false
81
82 - name: Get pnpm store directory
83 id: pnpm-store
84 run: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
85
86 - name: Use pnpm store
87 uses: actions/cache@v4
88 id: pnpm-cache
89 with:
90 path: |
91 ~/.cache/Cypress
92 ${{ steps.pnpm-store.outputs.pnpm_cache_dir }}
93 key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
94 restore-keys: |
95 ${{ runner.os }}-pnpm-
96
97 - name: Install Dependencies
98 run: pnpm install --frozen-lockfile --prefer-offline
99
100 - name: Build
101 run: pnpm -F @urql/core build && pnpm -F urql build
102
103 - name: e2e tests 🧪
104 uses: cypress-io/github-action@v6
105 with:
106 install: false
107 command: pnpm cypress run --component
108 working-directory: packages/react-urql
109
110 graphcache-e2e:
111 name: Graphcache E2E
112 runs-on: ubuntu-latest
113 timeout-minutes: 10
114 steps:
115 - name: Checkout Repo
116 uses: actions/checkout@v4
117 with:
118 fetch-depth: 0
119
120 - name: Setup Node
121 uses: actions/setup-node@v4
122 with:
123 node-version: 18
124
125 - name: Setup pnpm
126 uses: pnpm/action-setup@v3
127 with:
128 version: 9
129 run_install: false
130
131 - name: Get pnpm store directory
132 id: pnpm-store
133 run: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
134
135 - name: Use pnpm store
136 uses: actions/cache@v4
137 id: pnpm-cache
138 with:
139 path: |
140 ~/.cache/Cypress
141 ${{ steps.pnpm-store.outputs.pnpm_cache_dir }}
142 key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
143 restore-keys: |
144 ${{ runner.os }}-pnpm-
145
146 - name: Install Dependencies
147 run: pnpm install --frozen-lockfile --prefer-offline
148
149 - name: Build
150 run: pnpm -F "@urql/core" -F urql -F "@urql/exchange-execute" build
151
152 - name: e2e tests 🧪
153 uses: cypress-io/github-action@v6
154 with:
155 install: false
156 command: pnpm cypress run --component
157 working-directory: exchanges/graphcache
158
159 build:
160 name: Build
161 runs-on: ubuntu-latest
162 timeout-minutes: 10
163 strategy:
164 matrix:
165 node: [0, 1, 2]
166 env:
167 NODE_TOTAL: 3
168 NODE_INDEX: ${{matrix.node}}
169 steps:
170 - name: Checkout Repo
171 uses: actions/checkout@v4
172 with:
173 fetch-depth: 0
174
175 - name: Setup Node
176 uses: actions/setup-node@v4
177 with:
178 node-version: 18
179
180 - name: Setup pnpm
181 uses: pnpm/action-setup@v3
182 with:
183 version: 9
184 run_install: false
185
186 - name: Get pnpm store directory
187 id: pnpm-store
188 run: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
189
190 - name: Use pnpm store
191 uses: actions/cache@v4
192 id: pnpm-cache
193 with:
194 path: |
195 ~/.cache/Cypress
196 ${{ steps.pnpm-store.outputs.pnpm_cache_dir }}
197 key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
198 restore-keys: |
199 ${{ runner.os }}-pnpm-
200
201 - name: Install Dependencies
202 run: pnpm install --frozen-lockfile --prefer-offline
203
204 - name: Build
205 run: pnpm build
206
207 - name: Pack
208 uses: ./.github/actions/pnpm-run
209 with:
210 command: pack