Skip to content

chore: add codecov

chore: add codecov #1

Workflow file for this run

name: Coverage Deploy
on:
schedule:
- cron: "0 0 * * SAT"
workflow_dispatch:
pull_request: # temp
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
jobs:
coverage-build:
runs-on: ubuntu-latest
timeout-minutes: 300
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.81
- name: Install libsasl2-dev libssl-dev
run: sudo apt-get update && sudo apt install -y build-essential pkg-config libssl-dev libsasl2-dev
- name: Set up Just
uses: extractions/setup-just@v2
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: .tool-versions
- name: Rust Cache
uses: Swatinem/rust-cache@v2
id: cache-cargo
with:
prefix-key: ${{ runner.os }}-v3-cargo
shared-key: stable-release
key: ${{ hashFiles('Cargo.lock', 'Cargo.toml') }}
cache-provider: "github"
cache-directories: "~/.cargo/bin/"
- name: Set up dependencies
if: ${{ steps.cache-cargo.outputs.cache-hit != 'true' }}
run: |
cargo install killport || true
cargo install wait-service || true
- name: Install Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install Poetry
run: curl -sSL https://install.python-poetry.org | python3 -
- name: Install Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- uses: taiki-e/install-action@v2
with:
tool: [email protected]
- name: Generate coverage
run: |
mkdir -p target/llvm-cov/codecov
just stratus-test-coverage "--codecov --output-path target/llvm-cov/codecov/codecov.json"
- name: Upload coverage report artifact
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: target/llvm-cov/codecov/
retention-days: 90
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
directory: target/llvm-cov/codecov
token: ${{ secrets.CODECOV_TOKEN }}