chore: update dependencies, linter, workflows #18
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: Build and test | |
| on: [push, pull_request] | |
| permissions: {} | |
| env: | |
| GOLANGCI_LINT_VERSION: v2.11 | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| go-version: [stable, oldstable] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - name: Download and check dependencies | |
| run: | | |
| go mod tidy --diff | |
| - name: Install golangci-lint ${{ env.GOLANGCI_LINT_VERSION }} | |
| uses: golangci/golangci-lint-action@v9.0.0 | |
| with: | |
| version: ${{ env.GOLANGCI_LINT_VERSION }} | |
| - name: Install Compose | |
| uses: ndeloof/install-compose-action@v0.0.1 | |
| with: | |
| legacy: true | |
| - name: Run tests | |
| run: make test | |
| env: | |
| TEST_ARGS: "--count=1" # disable go test cache | |
| - name: Display docker-compose logs | |
| if: failure() | |
| run: docker-compose -f script/docker-compose.yml logs |