try to reduce ci time

This commit is contained in:
Sun Yimin 2023-06-27 08:41:01 +08:00 committed by GitHub
parent e25a8c6be2
commit c1ea628282
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,16 +23,31 @@ jobs:
go-version: ${{ matrix.goVer }} go-version: ${{ matrix.goVer }}
- name: Test with Coverage - name: Test with Coverage
if: ${{ matrix.goVer == '1.18' }}
run: go test -coverpkg=./... -v -short -coverprofile=coverage1.txt -covermode=atomic ./... run: go test -coverpkg=./... -v -short -coverprofile=coverage1.txt -covermode=atomic ./...
env: env:
GODEBUG: x509sha1=1 GODEBUG: x509sha1=1
- name: Test Generic - name: Test Generic with Coverage
if: ${{ matrix.goVer == '1.18' }}
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' }}
uses: codecov/codecov-action@v3 uses: codecov/codecov-action@v3
with: with:
files: ./coverage1.txt,./coverage2.txt files: ./coverage1.txt,./coverage2.txt
- 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' }}
run: go test -short -tags purego ./...
env:
GODEBUG: x509sha1=1