Testing CI #129
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
# Copyright Kani Contributors | |
# SPDX-License-Identifier: Apache-2.0 OR MIT | |
name: Kani Action Check | |
on: pull_request | |
jobs: | |
test-action: | |
runs-on: ubuntu-latest | |
name: Ensure that the Kani action continues to work | |
steps: | |
# To use this repository's private action, | |
# you must check out the repository | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Run Kani with invalid version | |
id: set_error | |
uses: ./ | |
with: | |
working-directory: tests/cargo-kani/simple-lib | |
kani-version: '0.1.10' | |
continue-on-error: true | |
- name: Check previous step outcome | |
id: get_error | |
run: | | |
# Check the outcome of "Run Kani with invalid version" | |
if [[ "${{ steps.set_error.outcome }}" == "failure" ]]; then | |
echo "Running Kani with invalid version "0.1.10" failed." | |
else | |
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: Test run Kani with older version | |
run: | | |
installed_version=$(kani --version | awk '{print $2}') | |
expected_version='0.33.0' | |
if [[ "$installed_version" == "$expected_version" ]]; then | |
echo "The installed version ($installed_version) matches the expected version ($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 | awk '{print $2}') | |
expected_version=$(cargo search kani-verifier | grep -m 1 "^kani-verifier " | awk '{print $3}' | sed 's/"//g') | |
echo "version online is $(cargo search kani-verifier | grep -m 1 "kani")." | |
if [[ "$installed_version" == "$expected_version" ]]; then | |
echo "The installed version ($installed_version) matches the latest version ($expected_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: | |
working-directory: tests/cargo-kani/proptest-lib | |
args: --tests | |
enable-propproof: true |