Bump actionlint from 1.7.4 to 1.7.5 #81
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 | |
pull_request: | |
paths: | |
- .github/workflows/functional-tests.yml | |
- action.yml | |
push: | |
branches: | |
- main | |
schedule: | |
# Every Friday at 09:00 JST | |
- cron: "0 0 * * 5" | |
workflow_dispatch: {} | |
defaults: | |
run: | |
shell: sh | |
jobs: | |
get-versions: | |
name: Get 3 latest versions | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
outputs: | |
versions: ${{ steps.prepare-list.outputs.versions }} | |
steps: | |
- name: Prepare list | |
id: prepare-list | |
env: | |
RELEASES_AMOUNT: "3" | |
TARGET_REPO: "ciao-lang/ciao" | |
run: | | |
versions=$(curl -sL \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
"https://api.github.com/repos/${TARGET_REPO}/releases" \ | |
| jq -c -r --arg n "${RELEASES_AMOUNT}" '[.[0:($n | tonumber)][].tag_name] | map(sub("^v"; "")) | . += ["latest"]') | |
echo "versions=${versions}" >> "$GITHUB_OUTPUT" | |
setup-ciao: | |
name: Setup Ciao | |
needs: [get-versions] | |
runs-on: ${{ matrix.os }}-latest | |
timeout-minutes: 5 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu", "macos", "windows"] | |
version: ${{ fromJSON(needs.get-versions.outputs.versions) }} | |
steps: | |
- name: Checkout ${{ github.repository }} | |
uses: actions/checkout@v4 | |
- name: Setup Ciao | |
id: setup-ciao | |
uses: ./ | |
with: | |
version: ${{ matrix.version }} | |
- 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 completion status" \ | |
"${{ steps.setup-ciao.outcome }}" \ | |
"success" | |
test_equal "ciao should not be installed" \ | |
"${{ steps.setup-ciao.outputs.installed }}" \ | |
"true" | |
- name: Run command | |
run: ciao list | |
test-force: | |
name: Test force | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
strategy: | |
fail-fast: false | |
matrix: | |
force: ["true", "false"] | |
steps: | |
- name: Checkout ${{ github.repository }} | |
uses: actions/checkout@v4 | |
- name: Setup Ciao 1 | |
id: setup-ciao-1 | |
uses: ./ | |
- name: Setup Ciao 2 | |
id: setup-ciao-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-ciao-1" \ | |
"${{ steps.setup-ciao-1.outputs.installed }}" \ | |
"true" | |
test_equal "Wrong \"installed\" output from setup-ciao-2" \ | |
"${{ steps.setup-ciao-2.outputs.installed }}" \ | |
"${{ matrix.force }}" |