Skip to content

Switch to testcontainers #304

Switch to testcontainers

Switch to testcontainers #304

Workflow file for this run

on:
push:
branches:
- master
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
workflow_dispatch:
name: CI
env:
RUST_TOOLCHAIN: stable
TOOLCHAIN_PROFILE: minimal
jobs:
fmt:
runs-on: ubuntu-latest
name: stable / fmt
steps:
- uses: actions/checkout@v4
- name: Install stable
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: cargo fmt
run: cargo fmt --check
clippy:
runs-on: ubuntu-latest
name: stable / clippy
steps:
- uses: actions/checkout@v4
- name: Install stable
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: cargo clippy
run: cargo clippy --all-targets --all-features --workspace -- -D warnings
test:
runs-on: ubuntu-latest
name: stable / test
steps:
- uses: actions/checkout@v4
- name: Install stable
uses: dtolnay/rust-toolchain@stable
- name: cargo test
run: cargo test --all-targets --all-features --workspace
# https://github.com/rust-lang/cargo/issues/6669
- name: cargo test --doc
run: cargo test --all-features --workspace --doc
publish:
name: Publish to crates.io
runs-on: ubuntu-latest
if: startsWith(github.event.ref, 'refs/tags/v')
needs: [fmt, clippy, test]
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: ${{ env.TOOLCHAIN_PROFILE }}
toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
- uses: katyo/publish-crates@v1
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}