-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (65 loc) · 2.03 KB
/
main.yml
File metadata and controls
70 lines (65 loc) · 2.03 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
name: main
on:
push:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- run: go mod tidy
- run: gofmt -w . && git diff --exit-code
- run: go vet ./...
- name: gosec
run: |
go install github.com/securego/gosec/v2/cmd/gosec@v2.23.0
gosec ./...
- name: govulncheck
run: |
go install golang.org/x/vuln/cmd/govulncheck@v1.1.4
govulncheck ./...
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- run: go test ./... -coverprofile=coverage.out
- run: ./scripts/check_go_coverage.py coverage.out 75
- run: ./scripts/check_go_package_coverage.py coverage.out 85 github.com/Clyra-AI/proof/core/exitcode,github.com/Clyra-AI/proof/internal/testutil
- run: ./scripts/check_go_package_coverage.py coverage.out 75 github.com/Clyra-AI/proof/core/exitcode
- run: ./scripts/test_contract_exitcodes.sh
- run: ./scripts/test_integration.sh
- run: ./scripts/test_e2e.sh
- run: ./scripts/test_acceptance.sh
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- run: go build ./cmd/proof
gait-compat:
name: Gait compatibility
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Clone gait
run: git clone https://github.com/Clyra-AI/gait.git /tmp/gait
- name: Point gait at proof HEAD
run: |
cd /tmp/gait
go mod edit -replace github.com/Clyra-AI/proof=$GITHUB_WORKSPACE
go mod tidy
- name: Build gait
run: cd /tmp/gait && go build ./cmd/gait
- name: Test gait
run: cd /tmp/gait && go test ./...