Skip to content

Commit

Permalink
test blocking and fang derive error
Browse files Browse the repository at this point in the history
  • Loading branch information
pxp9 committed Apr 8, 2024
1 parent c17740b commit d6f95fc
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
49 changes: 49 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,56 @@ jobs:

- name: Run clippy
run: cargo clippy --verbose --all-targets --all-features -- -D warnings

test_postgres_blocking:
name: Test blocking
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always

strategy:
matrix:
toolchain:
- stable

steps:
- uses: actions/checkout@v3

- name: Setup Rust
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}

- name: Install diesel-cli
run: cargo install diesel_cli --no-default-features --features postgres

- name: Setup Postgres db
working-directory: ./fang/postgres_migrations
run: diesel setup --database-url "postgres://postgres:postgres@localhost/fang"

- name: Run blocking tests
run: cargo test "blocking::queue::postgres" --verbose --features blocking --color always -- --nocapture

- name: Run blocking dirty tests
run: cargo test "blocking::queue::postgres" --verbose --features blocking -- --ignored

test_fang_derive_error:
name: Test fang_derive_error
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always

strategy:
matrix:
toolchain:
- stable

steps:
- uses: actions/checkout@v3

- name: Setup Rust
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}

- name: Run fang derive error tests
run: cargo test "fang_derive_error" --verbose --color always -- --nocapture
test_postgres:
name: Test postgres
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion fang-derive-error/example/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub enum MyAwesomeError {
MyVariantErrorTwo(u32),
}
#[cfg(test)]
mod tests {
mod fang_derive_error_tests {
use crate::MyAwesomeError;
use fang::FangError;

Expand Down

0 comments on commit d6f95fc

Please sign in to comment.