Skip to content

Commit

Permalink
Update test actions (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
vorlif authored Nov 28, 2023
1 parent 0d39365 commit 62ed167
Showing 1 changed file with 20 additions and 30 deletions.
50 changes: 20 additions & 30 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ jobs:
golangci:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: '1.17'

- uses: actions/checkout@v3

- uses: actions/setup-go@v4
with:
go-version: '1.21'
cache: false
- name: lint
uses: golangci/golangci-lint-action@v3
with:
Expand All @@ -30,17 +29,16 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/setup-go@v3
with:
go-version: 1.19.x
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: 'stable'

- name: Run coverage
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./...
- name: Run coverage
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./...

- name: Upload coverage to Codecov
run: bash <(curl -s https://codecov.io/bash)
- name: Upload coverage to Codecov
run: bash <(curl -s https://codecov.io/bash)

test:
strategy:
Expand All @@ -56,21 +54,13 @@ jobs:
name: '${{ matrix.platform }} | 1.${{ matrix.go }}.x'
runs-on: ${{ matrix.platform }}-latest
steps:

- uses: actions/checkout@v3

- uses: actions/setup-go@v3
with:
go-version: 1.${{ matrix.go }}.x

- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-1.${{ matrix.go }}.x-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-1.${{ matrix.go }}.x-
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: 1.${{ matrix.go }}.x

- name: Build
run: go build -tags timetzdata -v ./...
- name: Build
run: go build -tags timetzdata -v ./...

- name: Test
run: go test -tags timetzdata -v ./...
- name: Test
run: go test -tags timetzdata -v ./...

0 comments on commit 62ed167

Please sign in to comment.