refactor: remodel lint flow to empty string for root module #157
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: test | |
| on: [ push, pull_request ] | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| go: [ | |
| '1.24', | |
| ] | |
| os: [ | |
| ubuntu-latest, | |
| macos-latest, | |
| windows-latest, | |
| ] | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| OS: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Go ${{ matrix.go }} | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| check-latest: true | |
| cache-dependency-path: "**/*.sum" | |
| - name: Install test tooling | |
| shell: bash | |
| run: | | |
| go install gotest.tools/gotestsum@v1.12.2 | |
| - name: Test | |
| shell: bash | |
| run: gotestsum --format github-actions --junitfile junit.xml -- -v -coverpkg=./... -coverprofile=coverage.txt -covermode atomic -race $(go list -m | grep -v examples) | |
| - name: Publish Test Results | |
| uses: EnricoMi/publish-unit-test-result-action/linux@v2 | |
| if: runner.os == 'Linux' | |
| with: | |
| files: junit.xml | |
| check_run: false # Disable check run due to https://github.com/EnricoMi/publish-unit-test-result-action/issues/12 | |
| - name: Publish Test Results | |
| uses: EnricoMi/publish-unit-test-result-action/macos@v2 | |
| if: runner.os == 'macOS' | |
| with: | |
| files: junit.xml | |
| check_run: false # Disable check run due to https://github.com/EnricoMi/publish-unit-test-result-action/issues/12 | |
| - name: Publish Test Results | |
| uses: EnricoMi/publish-unit-test-result-action/windows/bash@v2 | |
| if: runner.os == 'Windows' | |
| with: | |
| files: junit.xml | |
| check_run: false # Disable check run due to https://github.com/EnricoMi/publish-unit-test-result-action/issues/12 | |
| - name: Upload code coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| if: matrix.go == '1.24' | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| env_vars: OS | |