Skip to content

Commit

Permalink
Merge pull request #7 from japaric/sanity-check
Browse files Browse the repository at this point in the history
sanity check
  • Loading branch information
japaric committed Jun 27, 2024
2 parents 58fdf35 + 0d36108 commit 98386e0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ jobs:
hickory_changed:
name: determine if hickory-dns source was modified
runs-on: ubuntu-latest
outputs:
outcome: ${{steps.output_step.outputs.outcome}}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: |
git diff --name-only origin/${{github.base_ref}} HEAD | grep -v '^conformance/' && echo outcome=1 || echo outcome=0
- id: output_step
run: |
git diff --name-only origin/${{github.base_ref}} HEAD | grep -v '^conformance/' && echo "outcome=1" >> "$GITHUB_OUTPUT" || echo "outcome=0" >> "$GITHUB_OUTPUT"
main-test:
name: unit and integration tests
Expand All @@ -28,7 +31,7 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
# runs conditionally
- name: cargo test
if: ${{needs.hickory_changed.outputs.outcome}} == 1
if: needs.hickory_changed.outputs.outcome == '1'
run: cargo test

# always runs
Expand Down

0 comments on commit 98386e0

Please sign in to comment.