From 84d5c10e17afaca6cb19e80495a831644b7b29a4 Mon Sep 17 00:00:00 2001 From: zekroTJA Date: Sun, 5 May 2024 11:26:52 +0200 Subject: [PATCH] update test CI --- .github/workflows/main-ci.yml | 45 +++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index fc3c563..41870ae 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -15,36 +15,41 @@ jobs: matrix: go-version: ["1.19", "1.20", "1.21", "^1.22"] steps: - - name: Set up Go 1.x uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} - - name: Check out code into the Go module directory uses: actions/checkout@v2 - - name: Get dependencies run: | go get -v -t -d ./... - - name: Run Tests with Race checks run: go test -v -timeout 300s -race ./... - - - name: Run Tests - run: go test -v -timeout 300s -covermode atomic -coverprofile=covprofile ./... - - - name: Install goveralls - if: ${{ matrix.go-version == '^1.16' }} - env: - GO111MODULE: off - run: go get github.com/mattn/goveralls - - - name: Send coverage - if: ${{ matrix.go-version == '^1.16' }} - env: - COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: goveralls -coverprofile=covprofile -service=github - - name: Run Benchmarks run: go test -timeout 300s -bench=. -benchmem + + coverage: + name: Test + runs-on: ubuntu-latest + strategy: + matrix: + go-version: ["^1.22"] + steps: + - name: Set up Go 1.x + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + - name: Get dependencies + run: | + go get -v -t -d ./... + - name: Run Tests + run: go test -v -timeout 300s -covermode atomic -coverprofile=covprofile ./... + - name: Install goveralls + run: go install github.com/mattn/goveralls@latest + - name: Send coverage + env: + COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: goveralls -coverprofile=covprofile -service=github