-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.24 KB
/
ci.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
name: pwm-ci
on:
push:
branches: [develop]
pull_request:
branches: [develop]
jobs:
test:
runs-on: ubuntu-latest
container:
image: golang:1.16
services:
postgres:
image: postgres:13.1
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
POSTGRES_HOST: postgres
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ^1.16
- name: build keys_manager
run: cd keys_manager && go build -o service server/server.go
- name: keys_manager testing
run: cd keys_manager && go test -v ./keys_manager_testing/.
- name: init database.
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
POSTGRES_HOST: postgres
TEST: true
SCHEMA_FILE_PATH: ./schema.sql
run: cd pwm_db_api && go build -o script cmd/main.go && ./script
- name: jwt test
run: cd pwm_authenticator/cmd/serve && go test -v jwt_token_test.go jwt_token.go