diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fcda4ba..adacf71 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -156,3 +156,40 @@ jobs: meta_releases_dict = json.loads('${{ steps.test-set-meta-releases.outputs.meta-releases-dict }}') assert isinstance(meta_releases_dict, dict) assert len(meta_releases_dict) > 0 + + test-install-cylc-components: + runs-on: ubuntu-latest + timeout-minutes: 5 + strategy: + matrix: + action: ['setup-python', 'setup-micromamba'] + steps: + - name: checkout repo + uses: actions/checkout@v4 + + - name: setup python + if: matrix.action == 'setup-python' + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: setup python + if: matrix.action == 'setup-micromamba' + uses: mamba-org/setup-micromamba@v2 + with: + cache-environment: true + post-cleanup: 'all' + environment-name: test + create-args: + python=3.10 + + - name: install-cylc-components + uses: ./install-cylc-components + with: + cylc_flow: true + cylc_flow_tag: 8.4.0 + + - name: test + shell: bash -elo pipefail {0} + run: | + [[ $(cylc version) == 8.4.0 ]] diff --git a/install-cylc-components/action.yml b/install-cylc-components/action.yml index 998f426..5e9167d 100644 --- a/install-cylc-components/action.yml +++ b/install-cylc-components/action.yml @@ -77,7 +77,8 @@ runs: using: composite steps: - name: Fetch meta-release info - shell: bash + # NOTE: use login shell to allow us to work with setup-micromamba + shell: bash -elo pipefail {0} run: | wget \ https://raw.githubusercontent.com/cylc/cylc-admin/master/docs/status/branches.json @@ -91,7 +92,7 @@ runs: (inputs.metomi_rose == 'true' && !inputs.metomi_rose_tag) || (inputs.cylc_rose == 'true' && !inputs.cylc_rose_tag) id: get_tag - shell: bash + shell: bash -elo pipefail {0} env: META_RELEASE: ${{ inputs.meta_release }} BASE_BRANCH: ${{ github.base_ref || github.ref }} @@ -99,7 +100,7 @@ runs: run: "${{ github.action_path }}/../bin/pick_compatible_branches" - name: Install - shell: bash + shell: bash -elo pipefail {0} env: cylc_flow: ${{ inputs.cylc_flow_tag || steps.get_tag.outputs.cylc_flow }} cylc_uis: ${{ inputs.cylc_uiserver_tag || steps.get_tag.outputs.cylc_uiserver }}