upgrade to v7.2 #321
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
push: | |
branches: [main] | |
jobs: | |
lint: | |
name: Lint & Tidy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: stable | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Lint | |
uses: golangci/golangci-lint-action@v5 | |
with: | |
version: v1.57 | |
- name: Tidy | |
run: go mod tidy | |
- name: Check Git Status | |
run: | | |
GIT_STATUS=$(git status --porcelain) | |
if [[ $GIT_STATUS ]]; then | |
echo $GIT_STATUS | |
echo "Git status is not clean, aborting" | |
exit 1 | |
else | |
echo "No changes after tidy, continuing" | |
fi | |
test-go-1-18: | |
name: Test go1.18 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.18" | |
- 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 | |
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 |