-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (43 loc) · 1.15 KB
/
go-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
49
50
name: go-test
on:
push:
branches: ["*"]
pull_request:
branches: ["*"]
env:
BUILD_TYPE: Release
jobs:
build:
strategy:
matrix:
os: ["ubuntu-22.04", "ubuntu-20.04"]
postgres-images: ["postgres:latest"]
go-version: ["1.20"]
runs-on: ${{ matrix.os }}
services:
testpostgres:
image: ${{matrix.postgres-images}}
env:
POSTGRES_DB: mbtestdb
POSTGRES_PASSWORD: mbtestpwd
POSTGRES_PORT: 5432
POSTGRES_USER: mbtestuser
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{matrix.go-version}}
# - name: Run all go tests
# run: go test ./... -v -race -coverprofile=coverage.txt -covermode=atomic
# env:
# POSTGRES_HOST: localhost
# TEST_DATA_DIR: /home/runner/work/MassBank3/MassBank3/
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3