-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (46 loc) · 1.6 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
45
46
47
48
49
50
51
52
53
54
55
name: Run Tests
on: [push, pull_request]
env:
DATABASE_PRISMA_URL: postgres://postgres:postgres@localhost:5432/test
DATABASE_URL: postgres://postgres:postgres@localhost:5432/test
PUBLIC_URL: http://localhost:5173
TWILIO_MESSAGING_SERVICE_SID: ${{ secrets.TWILIO_MESSAGING_SERVICE_SID }}
TWILIO_PHONE_NUMBER: ${{ secrets.TWILIO_PHONE_NUMBER }}
TWILIO_ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }}
TWILIO_API_SECRET: ${{ secrets.TWILIO_API_SECRET }}
TWILIO_AUTH_TOKEN: ${{ secrets.TWILIO_AUTH_TOKEN }}
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['18.x']
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
services:
postgres:
image: postgres:13
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run postinstall (db stuff)
run: yarn postinstall
- name: Build in node mode
run: yarn nodebuild
- name: Install playwright & dependencies
run: yarn exec playwright install --with-deps
- name: Run tests
run: yarn test