Skip to content

Documentation for DEX header #45

Documentation for DEX header

Documentation for DEX header #45

Workflow file for this run

name: Cargo build & test
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Run tests
run: RUSTFLAGS="-C instrument-coverage" cargo test --tests --verbose
- name: "`cargo-llvm-cov` ~ install"
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate coverage data
id: coverage
shell: bash
run: |
## Generate coverage data
COVERAGE_REPORT_DIR="target/debug"
COVERAGE_REPORT_FILE="${COVERAGE_REPORT_DIR}/lcov.info"
mkdir -p "${COVERAGE_REPORT_DIR}"
# display coverage files
cargo llvm-cov --all-features --workspace --lcov --output-path "${COVERAGE_REPORT_FILE}"
echo "report=${COVERAGE_REPORT_FILE}" >> $GITHUB_OUTPUT
- name: Upload coverage reports to Codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
uses: codecov/codecov-action@v3
with:
file: ${{ steps.coverage.outputs.report }}