-
Notifications
You must be signed in to change notification settings - Fork 21
42 lines (40 loc) · 972 Bytes
/
gotests.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
name: Go tests
on:
pull_request:
jobs:
gotests:
runs-on: ubuntu-20.04
strategy:
matrix:
go-version:
- "1.20"
- "1.21"
name: Tests for Go ${{ matrix.go-version}}
services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: aggregator
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Print env vars
run: env
- name: Unit tests
run: make test
- name: Check code coverage
run: ./check_coverage.sh do-not-run-tests
- name: Display code coverage
run: make coverage