-
Notifications
You must be signed in to change notification settings - Fork 88
76 lines (68 loc) · 2.11 KB
/
main.yaml
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
name: Go package
on:
# These will only run from a known contributor
push:
branches:
- main
pull_request:
branches:
- main
jobs:
pr_check:
runs-on: ubuntu-latest
services:
unleash-db:
image: postgres:15
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
POSTGRES_DB: "db"
# trust incoming connections blindly (DON'T DO THIS IN PRODUCTION!)
POSTGRES_HOST_AUTH_METHOD: "trust"
chrome-db:
image: postgres:14.1-alpine
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
POSTGRES_USER: chrome
POSTGRES_PASSWORD: chrome
ports:
- "5432:5432"
unleash_web:
image: unleashorg/unleash-server:latest
options: >-
--health-cmd "wget --no-verbose --tries=1 --spider http://localhost:4242/health || exit 1"
--health-interval 10s
--health-timeout 5s
--health-retries 5
--health-start-period 30s
ports:
- "4242:4242"
env:
DATABASE_URL: "postgres://postgres:unleash@unleash-db/postgres"
DATABASE_SSL: "false"
LOG_LEVEL: "warn"
INIT_FRONTEND_API_TOKENS: "default:development.unleash-insecure-frontend-api-token"
INIT_CLIENT_API_TOKENS: "default:development.unleash-insecure-api-token"
# This is set up to seed in feature flags, production is entirely different
INIT_ADMIN_API_TOKENS: "*:*.unleash-insecure-api-token"
AUTH_TYPE: "none"
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: 'Create env test file'
run: |
cat ./env.actions > .env
- name: 'Migrate DB'
run: make migrate
- name: Test
run: make test