diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 67f0acf..1f1b7c5 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -9,10 +9,42 @@ env: jobs: test: + name: Test runs-on: ubuntu-latest + strategy: + matrix: + toolchain: + - 1.85.0 # MSRV + - stable steps: - - uses: actions/checkout@v6 + - name: Checkout + uses: actions/checkout@v6 + - name: Install Rust + uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: ${{ matrix.toolchain }} + cache: true + - name: Check features + run: | + cargo check --no-default-features + cargo check --no-default-features --features wallet - name: Build run: cargo build - name: Test - run: cargo test + run: cargo test --no-fail-fast + + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + - name: Install Rust + uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: stable + cache: true + - name: Rustfmt + run: cargo fmt --all --check + - name: Lint + run: cargo clippy --all-targets --all-features -- -D warnings diff --git a/src/async_store.rs b/src/async_store.rs index 057ef46..9f02ef6 100644 --- a/src/async_store.rs +++ b/src/async_store.rs @@ -53,8 +53,8 @@ impl Store { Ok(store) } - /// Migrate. - pub(crate) async fn migrate(&self) -> Result<(), Error> { + /// Runs pending migrations against the database. + pub async fn migrate(&self) -> Result<(), Error> { Ok(sqlx::migrate!().run(&self.pool).await?) } }