[db] Improve depth first search #1403 #498
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: agdb_server | |
on: | |
pull_request: | |
branches: ["main"] | |
jobs: | |
diff: | |
runs-on: ubuntu-latest | |
outputs: | |
diff: ${{ steps.diff.outputs.diff }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- id: diff | |
shell: bash | |
run: | | |
if [[ "$(git diff origin/main --name-only -- agdb_server/ agdb/src/ agdb/Cargo.toml agdb_derive/src/ agdb_derive/Cargo.toml .github/workflows/agdb_server.yaml)" != "" ]]; then (echo "diff=true" >> $GITHUB_OUTPUT); fi | |
agdb_server_analyse: | |
runs-on: ubuntu-latest | |
needs: diff | |
if: needs.diff.outputs.diff == 'true' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- run: cargo clippy --package agdb_server --all-targets --all-features -- -D warnings | |
agdb_server_coverage: | |
runs-on: ubuntu-latest | |
needs: diff | |
if: needs.diff.outputs.diff == 'true' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- uses: taiki-e/install-action@cargo-llvm-cov | |
- run: rustup component add llvm-tools-preview | |
- run: cargo llvm-cov --package agdb_server --all-features --no-report --ignore-filename-regex "agdb(.|..)src|agdb_derive|agdb_api|api.rs" --fail-uncovered-functions 18 --show-missing-lines | |
agdb_server_test: | |
runs-on: ubuntu-latest | |
needs: diff | |
if: needs.diff.outputs.diff == 'true' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- run: threshold=2; count=0; while cargo test --release --package agdb_server &> test.log && [[ "$count" != "$threshold" ]]; do count=$((count+1)); echo -n "."; done; cat test.log; echo "$count of $threshold tests run" | |
agdb_server_format: | |
runs-on: ubuntu-latest | |
needs: diff | |
if: needs.diff.outputs.diff == 'true' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- run: cargo fmt --package agdb_server --check |