Fix docs #33
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: Api Tests | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| types: | |
| - opened | |
| - synchronize | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| api_test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.24.3' | |
| cache-dependency-path: MyMusicBoxApi/go.sum | |
| - name: Tidy modules (sync go.mod & go.sum) | |
| working-directory: MyMusicBoxApi | |
| run: go mod tidy | |
| - name: Run tests with coverage | |
| working-directory: MyMusicBoxApi | |
| run: go test -v -coverprofile=coverage.out ./... | |
| - name: Show coverage summary | |
| working-directory: MyMusicBoxApi | |
| run: go tool cover -func=coverage.out | |
| - name: Upload coverage artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: MyMusicBoxApi/coverage.out |