-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (38 loc) · 1.22 KB
/
test.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
name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
playwright:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: Set up pnpm
uses: pnpm/action-setup@v2
with:
version: latest
- name: Set up node
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
cache-dependency-path: package.json
- name: Install dependencies
run: |
pnpm install
npx playwright install chromium
- name: Run tests
run: pnpm test
env:
# needed to fetch website content
VITE_CONTENTFUL_SPACE_ID: ${{ secrets.VITE_CONTENTFUL_SPACE_ID }}
VITE_CONTENTFUL_ACCESS_TOKEN: ${{ secrets.VITE_CONTENTFUL_ACCESS_TOKEN }}
# needed to simulate form submission to Airtable test base
VITE_AIRTABLE_CHAPTER_BASE_APP_ID: ${{ secrets.VITE_AIRTABLE_CHAPTER_BASE_APP_ID }}
VITE_AIRTABLE_API_KEY: ${{ secrets.VITE_AIRTABLE_API_KEY }}
# needed to auto-complete and geocode addresses
VITE_MAPBOX_PUBLIC_KEY: ${{ secrets.VITE_MAPBOX_PUBLIC_KEY }}