Merge pull request #2 from MatProGo-dev/kr/feature/gonum-bug1 #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: Code Coverage # The name of the workflow that will appear on Github | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| go: [1.23] | |
| permissions: | |
| # Give the default GITHUB_TOKEN write permission to commit and push the | |
| # added or changed files to the repository. | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v2 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| - name: Build project | |
| run: go install ./... | |
| - name: Test Coverage | |
| run: | | |
| go test -v -cover $(go list ./... | grep -v /examples/) -coverprofile coverage.out -coverpkg ./... | |
| go tool cover -func coverage.out -o coverage_analysis.out | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v5 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage.out |