musichoard/.gitea/workflows/gitea-ci.yaml
Wojciech Kozlowski de564eb1a0
All checks were successful
Cargo CI / Build and Test (push) Successful in 1m43s
Cargo CI / Lint (push) Successful in 1m17s
Cargo CI / Build and Test (pull_request) Successful in 1m41s
Cargo CI / Lint (pull_request) Successful in 1m16s
Remove serde feature from uuid and url dependencies (#130)
Closes #129

Reviewed-on: #130
2024-02-10 20:58:40 +01:00

55 lines
1.8 KiB
YAML

name: Cargo CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
CARGO_TERM_VERBOSE: true
jobs:
build_and_test:
name: Build and Test
container: docker.io/drrobot/musichoard-ci:rust-1.75
env:
BEETSDIR: ./
LLVM_PROFILE_FILE: target/debug/profraw/musichoard-%p-%m.profraw
RUSTFLAGS: -C instrument-coverage
steps:
- uses: actions/checkout@v3
- run: cargo build --no-default-features --all-targets
- run: cargo test --no-default-features --all-targets --no-fail-fast
- run: cargo build --all-targets
- run: cargo test --all-targets --no-fail-fast
- run: cargo build --all-features --all-targets
- run: cargo test --all-features --all-targets --no-fail-fast
- run: >-
grcov target/debug/profraw
--binary-path target/debug/
--output-types html
--source-dir .
--ignore-not-existing
--ignore "tests/*"
--ignore "src/main.rs"
--ignore "src/bin/musichoard-edit.rs"
--excl-start "GRCOV_EXCL_START|mod tests \{"
--excl-stop "GRCOV_EXCL_STOP"
--output-path ./target/debug/coverage/
- run: >-
python3 .gitea/scripts/coverage.py
--coverage-file ./target/debug/coverage/coverage.json
--fail-under 100.00
lint:
name: Lint
container: docker.io/drrobot/musichoard-ci:rust-1.75
steps:
- uses: actions/checkout@v3
- run: cargo clippy --no-default-features --all-targets -- -D warnings
- run: cargo clippy --all-targets -- -D warnings
- run: cargo clippy --all-features --all-targets -- -D warnings
- run: cargo fmt -- --check