Skip to content

Add coverage config #44

Add coverage config

Add coverage config #44

Workflow file for this run

name: Continuous Integration
on:
workflow_dispatch:
pull_request:
branches:
- main
push:
branches:
- coverage
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Start Services
run: |
docker-compose up -d
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: rustfmt, clippy
- uses: swatinem/[email protected]
- name: Rust fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Run Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-features
- name: Build release
uses: actions-rs/cargo@v1
with:
command: build
args: --all --release --all-features
- name: Run Test
uses: actions-rs/cargo@v1
with:
command: test
args: --release --all-features --coverage
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}