Skip to content

Commit c3456ba

Browse files
authored
Provide a more ergonomic way of setting arguments and working directory (#7)
1 parent fd40fae commit c3456ba

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

.github/workflows/test-action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ jobs:
1515
- name: Run Kani
1616
uses: ./ # Uses the action in the root directory
1717
with:
18-
command: cd tests/cargo-kani/simple-lib && cargo-kani
18+
working-directory: tests/cargo-kani/simple-lib

action.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,29 @@ inputs:
1313
command:
1414
description: 'Command to run.'
1515
required: false
16-
default: 'cargo-kani --workspace'
16+
default: 'cargo-kani'
17+
working-directory:
18+
description: 'Directory to run kani on.'
19+
required: false
20+
default: '.'
21+
args:
22+
description: 'Arguments to pass to kani.'
23+
required: false
24+
default: ''
1725

1826
runs:
1927
using: "composite"
2028
steps:
2129
- name: Install Kani
2230
shell: bash
2331
run: |
24-
export KANI_VERSION="0.13.0"; \
25-
cargo install --version $KANI_VERSION --locked kani-verifier; \
32+
export KANI_VERSION="0.13.0";
33+
cargo install --version $KANI_VERSION --locked kani-verifier;
2634
cargo-kani setup;
2735
2836
- name: Run Kani
2937
shell: bash
3038
run: |
31-
${{ inputs.command }}
39+
cd ${{ inputs.working-directory }};
40+
${{ inputs.command }} ${{ inputs.args }}
3241

0 commit comments

Comments
 (0)