[server] Handle ctrl c #765 #12
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: pr-rust | |
on: | |
pull_request: | |
branches: ["main"] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
diff: | |
runs-on: ubuntu-latest | |
outputs: | |
diff: ${{ steps.diff.outputs.diff }} | |
diff_coverage: ${{ steps.diff.outputs.diff_coverage }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- id: diff | |
shell: bash | |
run: | | |
if [[ "$(git diff origin/main --name-only -- *.rs Cargo.toml .github/workflows/pr_rust.yaml)" != "" ]]; then (echo "diff=true" >> $GITHUB_OUTPUT) fi | |
if [[ "$(git diff origin/main --name-only -- agdb/* agdb_derive/* agdb_server/* .github/workflows/pr_rust.yaml)" != "" ]]; then (echo "diff_coverage=true" >> $GITHUB_OUTPUT) fi | |
analyse: | |
runs-on: ubuntu-latest | |
needs: diff | |
if: needs.diff.outputs.diff == 'true' | |
steps: | |
- uses: actions/checkout@v3 | |
- run: cargo clippy --workspace --all-targets -- -D warnings | |
coverage: | |
runs-on: ubuntu-latest | |
needs: diff | |
if: needs.diff.outputs.diff_coverage == 'true' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: taiki-e/install-action@cargo-llvm-cov | |
- run: rustup component add llvm-tools-preview | |
- run: cargo llvm-cov --package agdb --package agdb_server --ignore-filename-regex "agdb(_derive|_benchmarks)" --fail-uncovered-functions 0 --fail-uncovered-lines 0 --show-missing-lines | |
format: | |
runs-on: ubuntu-latest | |
needs: diff | |
if: needs.diff.outputs.diff == 'true' | |
steps: | |
- uses: actions/checkout@v3 | |
- run: cargo fmt --all --check |