-
Notifications
You must be signed in to change notification settings - Fork 4
59 lines (54 loc) · 1.46 KB
/
frontend.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
56
57
58
59
name: Frontend Tests
on:
pull_request:
push:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
container:
image: jetprotocol/builder:rust-1.68.0-node-18.15.0-solana-1.14.17-anchor-0.27.0-1
env:
PGUSER: ${{ env.PGUSER }}
PGPASSWORD: ${{ env.PGPASSWORD }}
PGDATABASE: ${{ env.PGDATABASE }}
PROGRAM_ID: ${{ env.PROGRAM_ID }}
PGHOST: postgres
ENDPOINT: http://localhost:8899
env:
PGUSER: myuser
PGPASSWORD: mypass
PGDATABASE: mydb
PROGRAM_ID: Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: ${{ env.PGUSER }}
POSTGRES_PASSWORD: ${{ env.PGPASSWORD }}
POSTGRES_DB: ${{ env.PGDATABASE }}
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
defaults:
run:
working-directory: ./frontend
steps:
- uses: actions/checkout@v3
- name: setup os dependencies
run: apt-get update && apt-get install -y jq
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "npm"
cache-dependency-path: frontend/package-lock.json
- name: Install deps
run: npm ci
- name: Build
run: npm run build
- name: Test
run: npm run test:ci