-
Notifications
You must be signed in to change notification settings - Fork 11
46 lines (42 loc) · 1007 Bytes
/
go-test.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
name: Go Unit Tests
on:
push:
branches:
- main
paths-ignore:
- 'docs/**'
- 'examples/**'
- '.github/workflows/**'
- '.goreleaser.yml'
- 'README.md'
pull_request:
branches:
- "*"
paths-ignore:
- 'docs/**'
- 'examples/**'
- '.github/workflows/**'
- '.goreleaser.yml'
- 'README.md'
jobs:
tests:
name: Go Tests
runs-on: self-hosted
timeout-minutes: 60
steps:
- name: Configure git for private modules
env:
TOKEN: ${{ secrets.GITLAB_PERSONAL_ACCESS_TOKEN }}
USER: ${{ secrets.GITLAB_USERNAME }}
run: git config --global url."https://${USER}:${TOKEN}@gitlab.com".insteadOf "https://gitlab.com"
- name: Install Go 1.20
uses: actions/setup-go@v1
with:
go-version: '1.20'
id: go
- uses: actions/checkout@master
- run: make cmd-go-mod-tidy
#- run: make cmd-go-mod-vendor
- name: Run tests
run: |
TF_ACC=1 go test -v ./... -timeout=30m