-
Notifications
You must be signed in to change notification settings - Fork 95
66 lines (49 loc) · 1.58 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
on: [push, pull_request]
name: CI
jobs:
ci:
strategy:
matrix:
go-version: [1.18.x]
runs-on: ubuntu-latest
env:
REVIEWDOG_REPORTER: github-check
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Install Reviewdog
uses: reviewdog/action-setup@v1
with:
reviewdog_version: v0.11.0
- name: Checkout code
uses: actions/checkout@v2
- name: Download Go Deps
run: go mod download
- name: Install Tools
run: |
# install 7zip for decompressing test demos
sudo apt-get install -y p7zip-full
# Install interface generator
go install github.com/vburenin/[email protected]
# Fetch refs for linter
git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
git fetch
# Install golangci-lint
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.52.2
- name: Build
run: scripts/build.sh
- name: Check Generated Code
run: scripts/check-interfaces-generated.sh
- name: Lint Changed Code
run: scripts/lint-changes.sh
- name: Race Tests
run: scripts/race-tests.sh
# Note: We run ALL tests again to get full coverage
# Race tests are too slow and skip the regression set
- name: All Tests + Coverage
run: |
scripts/coverage.sh
bash <(curl -s https://codecov.io/bash)