Skip to content

Commit

Permalink
Merge pull request #226 from dandi/moretests
Browse files Browse the repository at this point in the history
Add tests of Dandi Archive API queries
  • Loading branch information
jwodder authored Jan 23, 2025
2 parents 9a7abc3 + 109dda5 commit 39fa33e
Show file tree
Hide file tree
Showing 58 changed files with 11,134 additions and 248 deletions.
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[alias]
genstubs = ["run", "-p", "genstubs", "--", "mockspecs", "src/testdata/stubs"]
21 changes: 15 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,14 @@ jobs:
if: "!startsWith(github.head_ref, 'dependabot/')"
uses: Swatinem/rust-cache@v2

- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack

- name: Build crate
run: cargo build --all-targets --verbose
run: cargo hack --workspace build --all-targets --verbose

- name: Test crate
run: cargo test --verbose
run: cargo hack --workspace test --verbose

coverage:
# This is separate from the main tests because cargo-llvm-cov doesn't run
Expand All @@ -87,7 +90,7 @@ jobs:
tool: cargo-llvm-cov

- name: Test with coverage
run: cargo llvm-cov --all-features --lcov --output-path lcov.info
run: cargo llvm-cov --workspace --all-features --lcov --output-path lcov.info

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
Expand All @@ -112,11 +115,17 @@ jobs:
if: "!startsWith(github.head_ref, 'dependabot/')"
uses: Swatinem/rust-cache@v2

- name: Check code
run: cargo clippy --all-features --all-targets -- -Dwarnings
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack

- name: Check code (no tests)
run: cargo hack --workspace clippy -- -Dwarnings

- name: Check code (including tests)
run: cargo hack --workspace clippy --all-targets -- -Dwarnings

- name: Check formatting
run: cargo fmt --check
run: cargo fmt --all --check

docs:
runs-on: ubuntu-latest
Expand Down
Loading

0 comments on commit 39fa33e

Please sign in to comment.