-
Notifications
You must be signed in to change notification settings - Fork 65
66 lines (55 loc) · 1.67 KB
/
ci.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
57
58
59
60
61
62
63
64
65
66
name: ci
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
goVer: ['1.18', '1.19', '1.21', '1.22', '1.23']
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.goVer }}
- name: Test with Coverage
if: ${{ matrix.goVer == '1.18' }}
run: go test -coverpkg=./... -v -short -race -coverprofile=coverage1.txt -covermode=atomic ./...
env:
GODEBUG: x509sha1=1
- name: Test Generic with Coverage
if: ${{ matrix.goVer == '1.18' }}
run: go test -coverpkg=./... -v -short -tags purego -coverprofile=coverage2.txt -covermode=atomic ./...
env:
GODEBUG: x509sha1=1
- name: Upload coverage to Codecov
if: ${{ matrix.goVer == '1.18' }}
uses: codecov/codecov-action@v5
with:
files: ./coverage1.txt,./coverage2.txt
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Test Force SM4 Single Block with AES-NI
run: go test -short ./sm4/...
env:
FORCE_SM4BLOCK_AESNI: 1
- name: Test only
if: ${{ matrix.goVer != '1.18' }}
run: go test -short ./...
env:
GODEBUG: x509sha1=1
- name: Test Generic only
if: ${{ matrix.goVer != '1.18' && matrix.goVer != '1.23' }}
run: go test -short -tags purego ./...
env:
GODEBUG: x509sha1=1
- name: Test Plugin only
if: ${{ matrix.goVer != '1.18' }}
run: go test -short -tags plugin ./...
env:
GODEBUG: x509sha1=1