Skip to content

Create ignore

Create ignore #2

Workflow file for this run

name: Coverage
on:
push:
branches:
- main
- master
env:
CARGO_TERM_COLOR: always
# renovate: datasource=crate depName=cargo-tarpaulin versioning=semver
CARGO_TARPAULIN_VERSION: 0.26.1
# renovate: datasource=crate depName=diesel_cli versioning=semver
DIESEL_CLI_VERSION: 2.1.0
# renovate: datasource=github-releases depName=rust lookupName=rust-lang/rust
RUST_VERSION: 1.71.0
jobs:
coverage:
name: Test Coverage
runs-on: ubuntu-22.04
env:
RUST_BACKTRACE: 1
DATABASE_URL: postgres://postgres:postgres@localhost/cargo_registry_test
TEST_DATABASE_URL: postgres://postgres:postgres@localhost/cargo_registry_test
RUSTFLAGS: "-D warnings"
MALLOC_CONF: "background_thread:true,abort_conf:true,abort:true,junk:true"
services:
postgres:
image: postgres:13
env:
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/[email protected]
# Set up Rust
- run: rustup default ${{ env.RUST_VERSION }}
- uses: Swatinem/[email protected]
# Set up database
- run: cargo install diesel_cli --vers ${{ env.DIESEL_CLI_VERSION }} --no-default-features --features postgres --debug
- run: diesel database setup --locked-schema
# Set up cargo-tarpaulin and run the tests
- run: cargo install cargo-tarpaulin --version ${{ env.CARGO_TARPAULIN_VERSION }}
- run: cargo tarpaulin --avoid-cfg-tarpaulin --workspace