Commit d521c2e3 authored by Zebedee Nicholls's avatar Zebedee Nicholls
Browse files

Merge branch 'fix-test-conda-install' into 'main'

Fix test conda install

See merge request !50
parents f4d3df9e ec3d2842
Loading
Loading
Loading
Loading
Loading
+1 −0
Changes for changelog/50.improvement.md: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
Fixed up the template's test conda install workflow to recognise the fact that we use bash throughout better
+1 −10
Changes for template/{% if 'github' in project_url %}.github{% endif %}/workflows/{% if conda_release %}install-conda.yaml{% endif %}.jinja: 1 added line, 10 removed lines.
Original line number Diff line number Diff line
@@ -40,21 +40,12 @@ jobs:
          python={% raw %}${{ matrix.python-version }}{% endraw +%}
          -c conda-forge {% raw %}${{ matrix.install-target }}{% endraw +%}
        init-shell: bash
    - name: Get version non-windows
    - name: Get version
      shell: bash -leo pipefail {% raw %}{0}{% endraw +%}
      if: matrix.os != 'windows-latest'
      run: |
        INSTALLED_VERSION=`python -c 'import {{ project_name_python }}; print(f"v{% raw %}{{% endraw %}{{ project_name_python }}.__version__{% raw %}}{% endraw %}")'`
        echo $INSTALLED_VERSION
        echo "INSTALLED_VERSION=$INSTALLED_VERSION" >> $GITHUB_ENV
    - name: Get version windows
      shell: bash -leo pipefail {% raw %}{0}{% endraw +%}
      if: matrix.os == 'windows-latest'
      run: |
        python -c 'import {{ project_name_python }}; f = open("version.txt", "w"); f.write(f"INSTALLED_VERSION=v{% raw %}{{% endraw %}{{ project_name_python }}.__version__{% raw %}}{% endraw %}"); f.close()'
        echo "Showing version.txt"
        cat version.txt
        cat version.txt >> $env:GITHUB_ENV
    - name: Check installed version environment variable
      shell: bash -leo pipefail {% raw %}{0}{% endraw +%}
      run: |
+1 −10
Changes for tests/regression/ctt/github-include-cli-all-extras/.github/workflows/install-conda.yaml: 1 added line, 10 removed lines.
Original line number Diff line number Diff line
@@ -36,21 +36,12 @@ jobs:
          python=${{ matrix.python-version }}
          -c conda-forge ${{ matrix.install-target }}
        init-shell: bash
    - name: Get version non-windows
    - name: Get version
      shell: bash -leo pipefail {0}
      if: matrix.os != 'windows-latest'
      run: |
        INSTALLED_VERSION=`python -c 'import ctt_project; print(f"v{ctt_project.__version__}")'`
        echo $INSTALLED_VERSION
        echo "INSTALLED_VERSION=$INSTALLED_VERSION" >> $GITHUB_ENV
    - name: Get version windows
      shell: bash -leo pipefail {0}
      if: matrix.os == 'windows-latest'
      run: |
        python -c 'import ctt_project; f = open("version.txt", "w"); f.write(f"INSTALLED_VERSION=v{ctt_project.__version__}"); f.close()'
        echo "Showing version.txt"
        cat version.txt
        cat version.txt >> $env:GITHUB_ENV
    - name: Check installed version environment variable
      shell: bash -leo pipefail {0}
      run: |