Lock file maintenance (JS) (#7258) #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Coverage | |
on: | |
push: | |
branches: | |
- main | |
- master | |
env: | |
CARGO_TERM_COLOR: always | |
# renovate: datasource=crate depName=cargo-tarpaulin versioning=semver | |
CARGO_TARPAULIN_VERSION: 0.27.1 | |
# renovate: datasource=crate depName=diesel_cli versioning=semver | |
DIESEL_CLI_VERSION: 2.1.1 | |
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/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | |
# Set up Rust | |
- 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 |