forked from philippgille/gokv
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (36 loc) · 1.31 KB
/
test.yml
File metadata and controls
39 lines (36 loc) · 1.31 KB
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
name: test
# Push is enough even for PRs from maintainers, but not from contributors
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.17', '1.18', '1.19', '1.20', '1.21' ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- run: |
git clone --depth 1 --branch v1.13.0 https://github.com/magefile/mage
cd mage
go run bootstrap.go
- run: |
go version
go env
mage -version
docker version
# First build to check for compile errors
- run: mage build
# Then lint, taking `.golangci.yml` into account
- uses: golangci/golangci-lint-action@v3
# Finally test all modules
# This starts and stops Docker containers for services like PostgreSQL, Redis etc.
# Takes up to 10m on GitHub Actions
# TODO: Change workflow so that when only one module is changed, only that module's tests are run
- run: mage test all
# Combining of coverage reports not required with the action, which detects all reports in subdirectories and uploads all of them
#- run: build/combine-coverage.sh
# Upload coverage data to codecov.io
- uses: codecov/codecov-action@v2