-
Notifications
You must be signed in to change notification settings - Fork 35
48 lines (40 loc) · 926 Bytes
/
test.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
43
44
45
46
47
48
name: CI
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
jobs:
test:
name: test
strategy:
matrix:
go-version:
- 1.19.x # a minimum supported version(from go.mod)
- 1.20.x
- 1.21.x
- 1.22.x
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@master
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
cache: true # caching and restoring go modules and build outputs
- run: go env
- name: Install deps
run: go mod download
- name: Start containers
run: docker-compose up -d --build
- name: Test
run: make test
- name: Stop containers
if: always()
run: docker-compose down