forked from souramoo/commentoplusplus
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.04 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
name: Test CI
on:
workflow_call:
workflow_dispatch:
pull_request:
types: [opened, reopened, synchronize, review_requested]
jobs:
test-api:
name: Test API
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- name: Test
run: make --directory=api test
env:
COMMENTO_POSTGRES: postgres://postgres:[email protected]:5432/postgres?sslmode=disable
COMMENTO_ORIGIN: http://commento.example.com:8080
COMMENTO_PORT: 8080
COMMENTO_CDN_PREFIX: http://commento.example.com:8080
- name: Lint
run: cd api && test -z "$(go fmt)"