-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (73 loc) · 1.83 KB
/
pr.yml
File metadata and controls
73 lines (73 loc) · 1.83 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: PR
on:
pull_request:
branches:
- main
paths-ignore:
- '**.md'
jobs:
test:
name: Test
timeout-minutes: 4
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_DB: default_db
POSTGRES_USER: default_user
POSTGRES_PASSWORD: default_pass
options: >-
--health-cmd pg_isready
--health-interval 5s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
server:
image: opvious/api-server
env:
BUCKET_URL: file:///mnt/bucket
DB_URL: postgres://default_user:default_pass@postgres/default_db
NODE_ENV: development
OPVIOUS_API_IMAGE_EULA: accept
REDIS_URL: redis://redis
ports:
- 8080:8080
steps:
- name: Check out
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Set up Node
uses: actions/setup-node@v4
with:
cache: pnpm
registry-url: https://npm.pkg.github.com
- name: Install
run: pnpm i
env:
NODE_AUTH_TOKEN: ${{ secrets.GPR_RO_TOKEN }}
- name: Lint
run: pnpm run lint
- name: Test
run: pnpm t
env:
OPVIOUS_ENDPOINT: http://localhost:8080
OPVIOUS_TOKEN: license:${{ secrets.OPVIOUS_LICENSE_KEY }}
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: out/coverage