forked from raystack/frontier
-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (84 loc) · 1.99 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Test
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
unit:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:12
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.21'
- name: install dependencies
run: go mod tidy
- name: test binaries
env:
POSTGRES_PASSWORD: postgres
run: make test
- name: Send coverage to coveralls
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: coverage.out
e2e-smoke-test:
runs-on: ubuntu-latest
services:
pg1:
image: postgres:12
env:
POSTGRES_DB: "shield"
POSTGRES_USER: "shield"
POSTGRES_HOST_AUTH_METHOD: "trust"
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 30s
--health-timeout 30s
--health-retries 3
echo-server:
image: ealen/echo-server
ports:
- "4000:80"
spicedb:
image: quay.io/authzed/spicedb:v1.0.0
ports:
- "8080:8080"
- "50051:50051"
- "50053:50053"
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.21'
- name: install dependencies
run: go mod tidy
- name: install spicedb binary
uses: authzed/action-spicedb@v1
- name: run proxy tests
env:
POSTGRES_PASSWORD: postgres
run: make e2e-smoke-test