-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathci-actions.yml
More file actions
73 lines (73 loc) · 2.16 KB
/
ci-actions.yml
File metadata and controls
73 lines (73 loc) · 2.16 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: CIRCL
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
amd64_job:
name: Go-${{matrix.GOVER}}/amd64
runs-on: ubuntu-18.04
strategy:
matrix:
GOVER: ['1.16', '1.15', '1.14', '1.13', '1.12']
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Linting
uses: golangci/golangci-lint-action@v2
with:
version: v1.29
args: --config=./.etc/golangci.yml ./...
- name: Setup Go-${{ matrix.GOVER }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.GOVER }}
- name: Verifying Code
run: |
go generate -v ./... && test -z "$(git status --porcelain)"
go vet ./...
- name: Building
run: go build -v ./...
- name: Testing
run: go test -v -count=1 ./...
exotic_job:
name: Go-${{matrix.CFG[2]}}/${{matrix.CFG[0]}}
runs-on: ubuntu-18.04
strategy:
matrix:
CFG: [ [arm64,arm64v8,1.16] ]
steps:
- uses: actions/checkout@v2
- name: Enabling Docker Experimental
run: |
echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json
sudo service docker restart
- name: Pulling Images
run: |
docker pull -q multiarch/qemu-user-static
docker pull -q --platform linux/${{matrix.CFG[0]}} ${{matrix.CFG[1]}}/golang:${{matrix.CFG[2]}}
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Testing
run: |
docker run --rm -v `pwd`:`pwd` -w `pwd` ${{matrix.CFG[1]}}/golang:${{matrix.CFG[2]}} go test -v ./...
coverage_amd64_job:
needs: [ amd64_job ]
if: github.event_name == 'push'
runs-on: ubuntu-18.04
name: amd64/coverage
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.16'
- name: Produce Coverage
run: go test -race -coverprofile=./coverage.txt -covermode=atomic ./...
- name: Upload Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.txt