-
Notifications
You must be signed in to change notification settings - Fork 2
101 lines (90 loc) · 2.73 KB
/
integration-checks.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
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Nexus Client Integration Checks
on:
pull_request:
push:
paths-ignore:
- "docs/**"
- "README.md"
- "CONTRIBUTING.md"
- "LICENSE"
- "LICENSE_NOTICE"
- "Makefile"
- ".github/ISSUE_TEMPLATE/**"
branches:
- master
env:
GO_VERSION: 1.14
jobs:
golint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v1
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.27
args: --enable=golint --timeout=2m
unit_test:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Check out code
uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/go/pkg/mod/cache
key: ${{ runner.os }}-go-cache-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-cache-
- name: Run Unit Tests
run: go test ./nexus/... -count=1 -coverprofile=coverage.txt -covermode=atomic
- name: Validate codecov yaml file
run: curl -vvv --data-binary @codecov.yml https://codecov.io/validate
- name: Send Coverage Report
uses: codecov/codecov-action@v1
with:
file: ./coverage.txt
flags: aicura
name: aicura-test
fail_ci_if_error: true
integration_test:
name: Integration Tests
runs-on: ubuntu-latest
needs: [golint, unit_test]
env:
IMAGE_OUTPUT: ~/cache/images
steps:
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Check out code
uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/go/pkg/mod/cache
key: ${{ runner.os }}-go-cache-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-cache-
- name: Get Image Cache key
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Cache Image
uses: actions/cache@v2
with:
path: ${{ env.IMAGE_OUTPUT }}
key: ${{ runner.os }}-image-${{ steps.date.outputs.date }}
restore-keys: |
${{ runner.os }}-image-${{ steps.date.outputs.date }}
- name: Run Integration Tests
run: ./hack/ci/go-integration-test.sh