Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] Limit coverage to agdb proper #688 #690

Merged
merged 6 commits into from
Aug 23, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update pr.yaml
michaelvlach committed Aug 23, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 061e73e89095f4734b0b0e8c014c2d8fb9a2ed26
9 changes: 6 additions & 3 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -12,13 +12,16 @@ jobs:
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.yaml)" != "" ]]; then (echo "diff=true" >> $GITHUB_OUTPUT) fi
run: |
if [[ "$(git diff origin/main --name-only -- *.rs Cargo.toml .github/workflows/pr.yaml)" != "" ]]; then (echo "diff=true" >> $GITHUB_OUTPUT) fi
if [[ "$(git diff origin/main --name-only -- agdb/*.rs agdb/Cargo.toml .github/workflows/pr.yaml)" != "" ]]; then (echo "diff_coverage=true" >> $GITHUB_OUTPUT) fi

analyse:
runs-on: ubuntu-latest
@@ -30,13 +33,13 @@ jobs:

coverage:
runs-on: ubuntu-latest
needs: diff
needs: diff_coverage
if: needs.diff.outputs.diff == '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 --workspace --ignore-filename-regex agdb_derive --fail-uncovered-functions 0 --fail-uncovered-lines 0 --show-missing-lines
- run: cargo llvm-cov --package agdb --fail-uncovered-functions 0 --fail-uncovered-lines 0 --show-missing-lines

format:
runs-on: ubuntu-latest