diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 80b194b..9bd5321 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,10 +1,10 @@ -on: [pull_request] +on: [pull_request, push] name: Test jobs: test: strategy: matrix: - go-version: [1.22.x] + go-version: [1.25.x] os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: @@ -16,17 +16,19 @@ jobs: maximum-size: 13GB disk-root: "D:" - name: Install Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v4 with: go-version: ${{ matrix.go-version }} - name: Checkout code - uses: actions/checkout@v2 - - name: install - run: | - go get github.com/syndtr/goleveldb/leveldb - go get github.com/benitogf/ooo - go get github.com/pkg/expect - - name: lint - run: go vet . - - name: Test - run: go test -v -coverprofile cover.out -count 1 -failfast -race -bench . + uses: actions/checkout@v4 + - name: Download dependencies + run: go mod download + - name: Vet all packages + run: go vet ./... + - name: Test all packages + run: go test -v -coverprofile cover.out -count 1 -failfast -race -timeout 60s ./... + - name: Upload coverage + uses: actions/upload-artifact@v4 + with: + name: coverage-${{ matrix.os }} + path: cover.out