Skip to content

Make Migrations::new const #994

Make Migrations::new const

Make Migrations::new const #994

Workflow file for this run

on: [push, pull_request]
name: Continuous integration
env:
MSRV: 1.77.0
CARGO_TERM_COLOR: always
# Useful for cargo insta
CI: true
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: check
args: --locked
test_no_features:
name: Test no features
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: test
args: --locked
test_all_features:
name: Test all features
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: test
args: --locked --all-features
test_async_tokio_rusqlite:
name: Test feature alpha-async-tokio-rusqlite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: test
args: --locked --features alpha-async-tokio-rusqlite
test_from_directory:
name: Test feature from-directory
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: test
args: --locked --features from-directory
test_examples:
name: Test examples
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./examples
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: test
args: --locked
min_rust_version:
name: Check with minimal Rust version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.MSRV }}
override: true
- uses: actions-rs/cargo@v1
with:
command: test
args: --locked
doc:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- run: RUSTDOCFLAGS="-D warnings" cargo --locked doc --all-features --no-deps --lib
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
mutation-tests:
name: Mutation tests
runs-on: ubuntu-latest
strategy:
matrix:
shard: [0, 1, 2, 3]
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v2
- run: cargo install --locked cargo-mutants
- uses: actions-rs/cargo@v1
with:
command: mutants
args: -p rusqlite_migration --colors=always --no-shuffle -vV --shard ${{ matrix.shard }}/4
- name: Archive results
uses: actions/upload-artifact@v3
if: failure()
with:
name: mutation-report
path: mutants.out
clippy_all:
name: Clippy (all code)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v2
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --locked --all-features -- -D warnings
clippy_main:
name: Clippy (main package)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v2
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
# More stringent requirements
args: --locked --all-features -p rusqlite_migration -- -D warnings -D clippy::missing_errors_doc -D clippy::missing_panics_doc -D clippy::doc_link_with_quotes -D clippy::doc_markdown
coverage:
name: Code coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v2
- run: cargo install --locked cargo-tarpaulin
- name: Generate code coverage
uses: actions-rs/cargo@v1
with:
command: tarpaulin
args: --locked --all-features --run-types AllTargets --workspace --timeout 120 --out Lcov --exclude-files '**/benches/*'
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: lcov.info