-
Notifications
You must be signed in to change notification settings - Fork 44
48 lines (40 loc) · 970 Bytes
/
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
name: test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ 1.14, 1.15 ]
services:
postgres:
image: postgres:11-alpine
ports:
- 8765:5432
env:
POSTGRES_DB: test
POSTGRES_USER: test
POSTGRES_PASSWORD: test
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Run tests
run: go test -v -covermode=count -coverprofile=c.out ./...
- uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: c.out