build(deps): bump actions/setup-node from 4 to 6 #72
Workflow file for this run
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 | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| unit-test: | |
| name: Unit Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.25.5' | |
| check-latest: true | |
| - name: Run unit tests | |
| run: go test -v -race ./... | |
| coverage: | |
| name: Coverage Analysis | |
| needs: unit-test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.25.5' | |
| check-latest: true | |
| - name: Generate coverage report | |
| run: | | |
| go test -coverprofile=coverage.out -race ./... | |
| go tool cover -func=coverage.out | |
| lint: | |
| name: Code Quality | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.25.5' | |
| check-latest: true | |
| - name: Run go vet | |
| run: go vet ./... | |
| - name: Run gofmt check | |
| run: | | |
| output=$(gofmt -l .) | |
| if [ -n "$output" ]; then | |
| echo "❌ The following files are not properly formatted:" | |
| echo "$output" | |
| echo "" | |
| echo "Run 'gofmt -w .' to fix formatting." | |
| exit 1 | |
| fi | |
| echo "✅ All files are properly formatted." | |
| - name: Run golangci-lint | |
| uses: golangci/golangci-lint-action@v7 | |
| with: | |
| version: v2.12.2 | |
| args: --timeout 5m | |
| examples: | |
| name: Examples Verification | |
| needs: unit-test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.25.5' | |
| check-latest: true | |
| - name: Run all examples | |
| run: | | |
| echo "Running all examples..." | |
| for example_dir in examples/*/; do | |
| if [ -f "${example_dir}main.go" ]; then | |
| echo "========================================" | |
| echo "Running: ${example_dir}" | |
| echo "========================================" | |
| go run ${example_dir}main.go | |
| if [ $? -ne 0 ]; then | |
| echo "❌ Example failed: ${example_dir}" | |
| exit 1 | |
| else | |
| echo "✅ Example succeeded: ${example_dir}" | |
| fi | |
| echo "" | |
| fi | |
| done | |
| echo "All examples ran successfully!" |