Skip to content

use codecov token

use codecov token #78

Workflow file for this run

name: build
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
BUILD_TYPE: ["Debug"]
os: [ windows-2022 ]
steps:
- uses: actions/checkout@v2
- name: Install rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
# enable cache
- uses: Swatinem/rust-cache@v2
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
- uses: taiki-e/install-action@cargo-llvm-cov
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: -- --nocapture
# coverage
- name: run cmake
run: >
cmake . -DCMAKE_BUILD_TYPE=Debug -B build
- name: run coverage
run: |
cmake --build build --config Debug --target cov_all
cmake --build build --config Debug --target cov_summary
- name: Upload Report to Codecov
if: ${{ matrix.BUILD_TYPE == 'Debug' }}
uses: codecov/codecov-action@v4
with:
files: ./lcov.info
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }} # required