Update actions/checkout action to v6 (#19) #84
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 | |
| pull_request: | |
| branches: | |
| - "**" | |
| jobs: | |
| test: | |
| name: Test with Coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.22.1' | |
| - name: Check out code | |
| uses: actions/checkout@v6 | |
| - uses: actions/cache@v5 | |
| id: cache-go | |
| with: | |
| path: | | |
| ~/.cache/go-build | |
| ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Install dependencies | |
| if: steps.cache-go.outputs.cache-hit != 'true' | |
| run: | | |
| go mod download | |
| - name: Set up databases | |
| run: | | |
| docker compose up -d --wait --wait-timeout 60 | |
| env: | |
| TZ: Asia/Tokyo | |
| - name: Run unit tests | |
| run: | | |
| go test -p 1 -shuffle=on -race -coverpkg=./... -coverprofile=coverage.txt -covermode=atomic ./... | |
| env: | |
| TZ: Asia/Tokyo | |
| BUILD_MODE: test | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v6 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| slug: hidechae/gost |