mirror of
https://github.com/emmansun/gmsm.git
synced 2025-04-26 20:26:19 +08:00
ci: enable code coverage
This commit is contained in:
parent
2c0f5f68fc
commit
d433e416fa
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
@ -23,19 +23,19 @@ jobs:
|
|||||||
go-version: ${{ matrix.goVer }}
|
go-version: ${{ matrix.goVer }}
|
||||||
|
|
||||||
- name: Test with Coverage
|
- name: Test with Coverage
|
||||||
if: ${{ matrix.goVer == '1.18' }}
|
if: ${{ matrix.goVer == '1.23' }}
|
||||||
run: go test -coverpkg=./... -v -short -race -coverprofile=coverage1.txt -covermode=atomic ./...
|
run: go test -coverpkg=./... -v -short -race -coverprofile=coverage1.txt -covermode=atomic ./...
|
||||||
env:
|
env:
|
||||||
GODEBUG: x509sha1=1
|
GODEBUG: x509sha1=1
|
||||||
|
|
||||||
- name: Test Generic with Coverage
|
- name: Test Generic with Coverage
|
||||||
if: ${{ matrix.goVer == '1.18' }}
|
if: ${{ matrix.goVer == '1.23' }}
|
||||||
run: go test -coverpkg=./... -v -short -tags purego -coverprofile=coverage2.txt -covermode=atomic ./...
|
run: go test -coverpkg=./... -v -short -tags purego -coverprofile=coverage2.txt -covermode=atomic ./...
|
||||||
env:
|
env:
|
||||||
GODEBUG: x509sha1=1
|
GODEBUG: x509sha1=1
|
||||||
|
|
||||||
- name: Upload coverage to Codecov
|
- name: Upload coverage to Codecov
|
||||||
if: ${{ matrix.goVer == '1.18' }}
|
if: ${{ matrix.goVer == '1.23' }}
|
||||||
uses: codecov/codecov-action@v5
|
uses: codecov/codecov-action@v5
|
||||||
with:
|
with:
|
||||||
files: ./coverage1.txt,./coverage2.txt
|
files: ./coverage1.txt,./coverage2.txt
|
||||||
@ -48,19 +48,19 @@ jobs:
|
|||||||
FORCE_SM4BLOCK_AESNI: 1
|
FORCE_SM4BLOCK_AESNI: 1
|
||||||
|
|
||||||
- name: Test only
|
- name: Test only
|
||||||
if: ${{ matrix.goVer != '1.18' }}
|
if: ${{ matrix.goVer != '1.23' }}
|
||||||
run: go test -short ./...
|
run: go test -short ./...
|
||||||
env:
|
env:
|
||||||
GODEBUG: x509sha1=1
|
GODEBUG: x509sha1=1
|
||||||
|
|
||||||
- name: Test Generic only
|
- name: Test Generic only
|
||||||
if: ${{ matrix.goVer != '1.18' && matrix.goVer != '1.23' }}
|
if: ${{ matrix.goVer != '1.23' }}
|
||||||
run: go test -short -tags purego ./...
|
run: go test -short -tags purego ./...
|
||||||
env:
|
env:
|
||||||
GODEBUG: x509sha1=1
|
GODEBUG: x509sha1=1
|
||||||
|
|
||||||
- name: Test Plugin only
|
- name: Test Plugin only
|
||||||
if: ${{ matrix.goVer != '1.18' }}
|
if: ${{ matrix.goVer == '1.23' }}
|
||||||
run: go test -short -tags plugin ./...
|
run: go test -short -tags plugin ./...
|
||||||
env:
|
env:
|
||||||
GODEBUG: x509sha1=1
|
GODEBUG: x509sha1=1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user