fix: update go module file to denote correct version constraint for g… #3
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: Test | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| go-version: ['1.24', '1.25'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - name: Get dependencies | |
| run: go mod download | |
| - name: Run tests | |
| run: go test -v -cover ./... | |
| - name: Run vet | |
| run: go vet ./... | |
| - name: Run gofmt | |
| run: | | |
| if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then | |
| echo "Please run 'gofmt -s -w .' to format the code" | |
| gofmt -s -d . | |
| exit 1 | |
| fi | |
| - name: Build examples | |
| run: | | |
| go build -o /tmp/list ./examples/list | |
| go build -o /tmp/get ./examples/get | |
| go build -o /tmp/paginate ./examples/paginate |