Skip to content

Commit

Permalink
Add tests for other actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jaisnan committed Sep 20, 2023
1 parent 4144544 commit 8935f68
Showing 1 changed file with 31 additions and 5 deletions.
36 changes: 31 additions & 5 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,49 @@ jobs:
- name: Check previous step outcome
id: get_error
run: |
# Check the outcome of Step 2
# Check the outcome of "Run Kani with invalid version"
if [[ "${{ steps.set_error.outcome }}" == "failure" ]]; then
echo "Step 2 failed."
# You can take additional actions based on the failure.
echo "Running Kani with invalid version "0.1.10" failed."
else
echo "Step 2 succeeded or was skipped."
echo "::error::Running Kani with invalid version succeeded incorrectly or was skipped."
exit 1
fi
- name: Run Kani with older version
uses: ./ # Uses the action in the root directory
with:
working-directory: tests/cargo-kani/simple-lib
kani-version: '0.33.0'
- name: Run Kani

- name: Test run Kani with older version
run: |
installed_version = $(kani --version)
expected_version = '0.33.0'
if [[ "$installed_version" == "$expected_version" ]]; then
echo "The installed version matches the expected version."
else
echo "::error::The installed version ($installed_version) does not match the expected version ($expected_version)."
exit 1
fi
- name: Run Kani with latest version
uses: ./ # Uses the action in the root directory
with:
working-directory: tests/cargo-kani/simple-lib

- name: Test run Kani with latest version
run: |
installed_version = $(kani --version)
expected_version = $(cargo search kani-verifier | grep -m 1 "^kani-verifier " | awk '{print $3}')
if [[ "$installed_version" == "$expected_version" ]]; then
echo "The installed version matches the latest version."
else
echo "::error::The installed version ($installed_version) does not match the latest version ($expected_version)."
exit 1
fi
- name: Test ProfProof within Kani Action
uses: ./
with:
Expand Down

0 comments on commit 8935f68

Please sign in to comment.