Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: test on latest go #146

Merged
merged 7 commits into from
Mar 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
ignore:
- methods_gen.go
- examples
46 changes: 27 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,28 @@ name: CI
on:
pull_request:
push:
branches: [ main ]
branches: [main]

jobs:
lint:
name: Lint
name: Lint & Tidy
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: "1.18"
go-version: stable

- name: Checkout
uses: actions/checkout@v4

- name: Lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.46

tidy:
name: Go Tidy
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: "1.18"

- name: Checkout
uses: actions/checkout@v4
version: v1.57

- name: Tidy
run: make go-tidy
run: go mod tidy

- name: Check Git Status
run: |
Expand All @@ -49,8 +37,8 @@ jobs:
echo "No changes after tidy, continuing"
fi

test:
name: Test
test-go-1-18:
name: Test go1.18
runs-on: ubuntu-latest
steps:
- name: Install Go
Expand All @@ -68,3 +56,23 @@ jobs:
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos

test-go-latest:
name: Test latest stable
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: "stable"

- name: Checkout
uses: actions/checkout@v4

- name: Test
run: go test -timeout 30s -v -race -coverprofile=coverage.txt ./...

- name: Upload coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
Loading