-
Notifications
You must be signed in to change notification settings - Fork 28
41 lines (39 loc) · 1.09 KB
/
go.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
name: Build and Test
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
name: Go CI
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.21', '1.22']
services:
postgres:
image: postgres:16.3
env:
POSTGRES_USER: dcrpooluser
POSTGRES_PASSWORD: 12345
POSTGRES_DB: dcrpooltestdb
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Set up Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 #v5.0.1
with:
go-version: ${{ matrix.go }}
- name: Check out source
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 #v4.1.6
- name: Install Linters
run: "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.59.0"
- name: Build
run: go build ./...
- name: Test
run: |
./run_tests.sh