-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (39 loc) · 921 Bytes
/
ci.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
name: CI
on:
push:
branches:
- master
tags:
- "v*"
pull_request:
jobs:
test:
strategy:
matrix:
go: [ "1.18", "1.19" ]
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
- name: Set up Golang ${{ matrix.go }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: lint
run: |
cd $GITHUB_WORKSPACE
go vet ./...
- name: tests
run: go test ./... -timeout 30s -race
release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [ test ]
steps:
- uses: actions/checkout@v3
- name: Set up Golang
uses: actions/setup-go@v3
with:
go-version: "1.19"
- name: Index module
run: GOPROXY=proxy.golang.org go list -m github.com/sopherapps/go-scdb@$GITHUB_REF_NAME