deps(deps): bump golang.org/x/time from 0.3.0 to 0.14.0 #287
This file contains hidden or 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: Go Tests | |
permissions: | |
contents: read | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'sandbox-*' | |
- 'beta-*' | |
- 'feature-*' | |
- 'dev-*' | |
- 'fix/*' | |
pull_request: | |
branches: [ main ] | |
# Allow manual triggering | |
workflow_dispatch: | |
env: | |
GOEXPERIMENT: loopvar | |
GOTOOLCHAIN: auto | |
jobs: | |
test: | |
name: Run Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.23' | |
check-latest: true | |
- name: Prepare go.mod for CI | |
run: | | |
# Remove toolchain directive for CI compatibility | |
sed -i '/^toolchain/d' go.mod | |
- name: Verify dependencies | |
run: go mod verify | |
- name: Build | |
run: go build -v ./... | |
- name: Run unit tests | |
run: go test -v ./pkg/... -short -coverprofile=coverage.txt -covermode=atomic | |
- name: Display test coverage | |
run: go tool cover -func=coverage.txt | |
- name: Upload coverage report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-report | |
path: coverage.txt | |
retention-days: 7 | |
quality: | |
name: Code Quality | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.23' | |
check-latest: true | |
- name: Prepare go.mod for CI | |
run: | | |
# Remove toolchain directive for CI compatibility | |
sed -i '/^toolchain/d' go.mod | |
- name: Check formatting | |
run: | | |
if [ -n "$(gofmt -l .)" ]; then | |
echo "The following files are not formatted correctly:" | |
gofmt -l . | |
exit 1 | |
fi | |
- name: Run go vet | |
run: go vet ./... | |
- name: Install golint | |
run: go install golang.org/x/lint/golint@latest | |
- name: Run golint | |
run: golint -set_exit_status ./... | |
- name: Install ineffassign | |
run: go install github.com/gordonklaus/ineffassign@latest | |
- name: Run ineffassign | |
run: ineffassign ./... | |
- name: Install misspell | |
run: go install github.com/client9/misspell/cmd/misspell@latest | |
- name: Run misspell | |
run: misspell -error . | |
- name: Install gocyclo | |
run: go install github.com/fzipp/gocyclo/cmd/gocyclo@latest | |
- name: Run gocyclo | |
run: gocyclo -over 15 . |