-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (54 loc) · 1.38 KB
/
tests.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
name: build
on:
push:
branches:
- "main"
pull_request:
jobs:
golangci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.23.2
- run: go generate ./...
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60.2
args: --verbose --timeout 20m --max-same-issues=30 --allow-parallel-runners
go-tidy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.23.2
- name: Verify tidy
run: |
go mod tidy
git diff --exit-code
go-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version: 1.23.2
- uses: hashicorp/setup-terraform@v2
with:
terraform_version: "1.3.*"
terraform_wrapper: false
- run: |
go generate ./...
go test -v -cover ./...
env:
TF_ACC: "1"
# Test uses mock service, and any value should work
BYTEBASE_SERVICE_ACCOUNT: "[email protected]"
BYTEBASE_SERVICE_KEY: "12345"
BYTEBASE_URL: "https://bytebase.example.com"