Skip to content

test-updatecli-run

test-updatecli-run #62

name: test-updatecli-run
on:
merge_group: ~
workflow_dispatch: ~
pull_request:
branches:
- main
paths:
- '.github/workflows/test-updatecli-run.yml'
- 'updatecli/run/**'
push:
branches:
- main
paths:
- '.github/workflows/test-updatecli-run.yml'
- 'updatecli/run/**'
permissions:
contents: read
jobs:
test:
needs:
- default
- version
- version-file
- version-file-updatecli
runs-on: ubuntu-latest
steps:
- id: check
uses: elastic/oblt-actions/check-dependent-jobs@v1
with:
jobs: ${{ toJSON(needs) }}
- run: ${{ steps.check.outputs.is-success }}
default:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./updatecli/run
with:
command: help
- name: Verify updatecli version
run: |
want=$(cat updatecli/install/.default-updatecli-version | cut -dv -f2)
got=$(updatecli version 2>&1)
echo "${got} == ${want}"
[[ "${got}" == *"${want}"* ]]
version:
runs-on: ubuntu-latest
env:
want: "0.86.0"
steps:
- uses: actions/checkout@v4
- uses: ./updatecli/run
with:
command: help
version: "v${{ env.want }}"
- name: Verify updatecli version
run: |
got=$(updatecli version 2>&1)
echo "${got} == ${want}"
[[ "${got}" == *"${want}"* ]]
version-file:
runs-on: ubuntu-latest
env:
want: "0.85.0"
steps:
- uses: actions/checkout@v4
- name: Setup version file
run: |
echo "v${want}" > .tools-version
- uses: ./updatecli/run
with:
command: help
version-file: .tools-version
- name: Verify updatecli version
run: |
got=$(updatecli version 2>&1)
echo "${got} == ${want}"
[[ "${got}" == *"${want}"* ]]
version-file-updatecli:
runs-on: ubuntu-latest
env:
want: "0.84.0"
steps:
- uses: actions/checkout@v4
- name: Setup version file
run: |
echo "updatecli v${want}" > .tools-version
- uses: ./updatecli/install
with:
version-file: .tools-version
- name: Verify updatecli version
run: |
got=$(updatecli version 2>&1)
echo "${got} == ${want}"
[[ "${got}" == *"${want}"* ]]