Add "force" input #212
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
--- | |
name: Functional Tests | |
on: # yamllint disable-line rule:truthy | |
push: | |
branches: | |
- main | |
pull_request: | |
paths: | |
- .github/workflows/functional-tests.yml | |
- src/** | |
- action.yml | |
schedule: | |
# Every Friday at 09:00 JST | |
- cron: "0 0 * * 5" | |
workflow_dispatch: {} | |
defaults: | |
run: | |
shell: sh | |
jobs: | |
run-script: | |
name: Run script | |
runs-on: ${{ matrix.os }}-latest | |
timeout-minutes: 20 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu", "macos", "windows"] | |
steps: | |
- name: Checkout ${{ github.repository }} | |
uses: actions/checkout@v4 | |
- name: Setup Kitten | |
uses: ./ | |
- name: Run script | |
run: kitten ./hello-world.ktn | |
test-force: | |
name: Test force | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
strategy: | |
fail-fast: false | |
matrix: | |
force: ["true", "false"] | |
steps: | |
- name: Checkout ${{ github.repository }} | |
uses: actions/checkout@v4 | |
- name: Setup kitten 1 | |
id: setup-kitten-1 | |
uses: ./ | |
- name: Setup kitten 2 | |
id: setup-kitten-2 | |
uses: ./ | |
with: | |
force: ${{ matrix.force }} | |
- name: Test action completion | |
run: | | |
test_equal() { | |
if [ "${2}" != "${3}" ]; then | |
echo "::error title=${1}::Expected: ${3}. Actual: ${2}." | |
exit 1 | |
fi | |
} | |
test_equal "Wrong \"installed\" output from setup-kitten-1" \ | |
"${{ steps.setup-kitten-1.outputs.installed }}" \ | |
"true" | |
test_equal "Wrong \"installed\" output from setup-kitten-2" \ | |
"${{ steps.setup-kitten-2.outputs.installed }}" \ | |
"${{ matrix.force }}" |