Prepare v0.7.5 release #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: Coverage | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| schedule: | |
| - cron: "47 3 * * 1" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: coverage-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: false | |
| env: | |
| CODACY_ORGANIZATION_PROVIDER: gh | |
| CODACY_USERNAME: netdata | |
| CODACY_PROJECT_NAME: systemd-journal-sdk | |
| CODACY_REPORTER_VERSION: "14.1.3" | |
| jobs: | |
| go: | |
| name: Go coverage | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go/go.mod | |
| cache-dependency-path: go/go.sum | |
| - name: Generate Go coverage | |
| run: tests/coverage/run_go_coverage.sh | |
| - name: Upload Go coverage artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: coverage-go | |
| path: | | |
| .local/coverage/go/coverage.out | |
| .local/coverage/go/coverage.txt | |
| if-no-files-found: error | |
| rust: | |
| name: Rust coverage | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 | |
| with: | |
| toolchain: stable | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@28ba36d36bfc4814f98a469ff9f76b2a41e9aa8a | |
| with: | |
| tool: cargo-llvm-cov | |
| - name: Generate Rust coverage | |
| run: tests/coverage/run_rust_coverage.sh | |
| - name: Upload Rust coverage artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: coverage-rust | |
| path: | | |
| .local/coverage/rust/lcov.info | |
| if-no-files-found: error | |
| upload: | |
| name: Upload coverage to Codacy | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| needs: | |
| - go | |
| - rust | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Download coverage artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| path: .local/coverage-artifacts | |
| - name: Upload coverage | |
| env: | |
| CODACY_API_TOKEN: ${{ secrets.CODACY_API_TOKEN }} | |
| run: tests/coverage/upload_codacy_coverage.sh | |
| - name: Write coverage summary | |
| run: | | |
| { | |
| echo "## Coverage" | |
| echo | |
| if [ -n "${CODACY_API_TOKEN:-}" ]; then | |
| echo "Coverage reports were uploaded to Codacy." | |
| else | |
| echo "Coverage reports were generated, but Codacy upload was skipped because \`CODACY_API_TOKEN\` is not configured for this run." | |
| fi | |
| } >> "${GITHUB_STEP_SUMMARY}" | |
| env: | |
| CODACY_API_TOKEN: ${{ secrets.CODACY_API_TOKEN }} |