| 1 |
name: CI |
| 2 |
on: |
| 3 |
push: |
| 4 |
branches: [main, master] |
| 5 |
pull_request: |
| 6 |
branches: [main, master] |
| 7 |
|
| 8 |
jobs: |
| 9 |
lint: |
| 10 |
name: Lint |
| 11 |
runs-on: ubuntu-latest |
| 12 |
steps: |
| 13 |
- uses: actions/checkout@v4 |
| 14 |
- uses: actions/setup-go@v5 |
| 15 |
with: |
| 16 |
go-version-file: go.mod |
| 17 |
- name: golangci-lint |
| 18 |
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 |
| 19 |
with: |
| 20 |
version: v2.3.0 |
| 21 |
|
| 22 |
test: |
| 23 |
name: Test |
| 24 |
strategy: |
| 25 |
matrix: |
| 26 |
go: ["1.19", "1.20", "1.21", "1.22", "1.23", "1.24"] |
| 27 |
runs-on: ubuntu-latest |
| 28 |
steps: |
| 29 |
- uses: actions/checkout@v4 |
| 30 |
with: |
| 31 |
fetch-depth: 0 |
| 32 |
- uses: actions/setup-go@v4 |
| 33 |
with: |
| 34 |
go-version: ${{ matrix.go }} |
| 35 |
- name: Test |
| 36 |
run: | |
| 37 |
go vet . |
| 38 |
go build . |
| 39 |
go test -count=1 -covermode=count -coverprofile=coverage.out . |
| 40 |
|
| 41 |
legacy-test: |
| 42 |
name: Legacy Tests |
| 43 |
strategy: |
| 44 |
matrix: |
| 45 |
go: ["1.19", "1.20", "1.21", "1.22", "1.23"] |
| 46 |
runs-on: ubuntu-latest |
| 47 |
steps: |
| 48 |
- uses: actions/checkout@v4 |
| 49 |
with: |
| 50 |
fetch-depth: 0 |
| 51 |
- uses: actions/setup-go@v4 |
| 52 |
with: |
| 53 |
go-version: ${{ matrix.go }} |
| 54 |
- name: Test |
| 55 |
run: | |
| 56 |
go vet -tags=legacy . |
| 57 |
go build -tags=legacy . |
| 58 |
GODEBUG=x509sha1=1 go test -tags=legacy -count=1 -covermode=count -coverprofile=coverage.out . -run "^TestLegacy.*$" |