chore: fix inconsistent function name in comment (#88) #103
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: [ main ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: Test Suite | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Read Go version | |
| id: go-version | |
| run: | | |
| GO_VERSION=$(cat .go-version) | |
| echo "version=$GO_VERSION" >> $GITHUB_OUTPUT | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: ${{ steps.go-version.outputs.version }} | |
| cache: true | |
| - name: Install go-junit-report | |
| run: go install github.com/jstemmer/go-junit-report@latest | |
| - name: Run tests | |
| run: | | |
| go test -v -race -coverprofile=coverage.txt ./... 2>&1 | tee test_output.txt | |
| - name: Generate JUnit XML | |
| if: always() | |
| run: | | |
| cat test_output.txt | go-junit-report > junit.xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| slug: ${{ github.repository }} | |
| fail_ci_if_error: false | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/test-results-action@v1 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} |