diff --git a/.github/workflows/gh-ci.yaml b/.github/workflows/gh-ci.yaml index 29f3d07..692cffe 100644 --- a/.github/workflows/gh-ci.yaml +++ b/.github/workflows/gh-ci.yaml @@ -26,9 +26,9 @@ defaults: shell: bash -l {0} env: - MDANALYSIS_DEVELOP_VERSION: "2.11.0-dev0" - MDANALYSIS_LATEST_RELEASE: "2.10.0" - MDANALYSIS_PREVIOUS_RELEASE: "2.9.0" + MDANALYSIS_DEVELOP_VERSION: "2.12.0-dev0" + MDANALYSIS_LATEST_RELEASE: "2.11.0" + MDANALYSIS_PREVIOUS_RELEASE: "2.10.0" jobs: gen-python-matrix: @@ -39,7 +39,7 @@ jobs: oldest-python: ${{ steps.get-compatible-python.outputs.oldest-python }} stable-python: ${{ steps.get-compatible-python.outputs.stable-python }} steps: - - uses: actions/setup-python@v6 + - uses: actions/setup-python@v7 with: python-version: "3.13" @@ -78,7 +78,7 @@ jobs: mdanalysis-version: "latest" steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - id: environment-setup run: | @@ -113,15 +113,13 @@ jobs: with: python-version: ${{ matrix.python-version }} add-pip-as-python-dependency: true - architecture: x64 - mamba-version: "*" - channels: conda-forge, defaults - auto-update-conda: true - show-channel-urls: true + miniforge-version: "26.7.2-1" + channels: conda-forge + auto-update-conda: false - name: Setup Python ${{ matrix.python-version }} if: ${{ matrix.installer == 'pip' }} - uses: actions/setup-python@v6 + uses: actions/setup-python@v7 with: python-version: ${{ matrix.python-version }} @@ -160,7 +158,7 @@ jobs: needs: gen-python-matrix runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Install mamba Python ${{ needs.gen-python-matrix.outputs.stable-python }} uses: mamba-org/setup-micromamba@v3 @@ -190,10 +188,10 @@ jobs: needs: gen-python-matrix runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Setup Python ${{ needs.gen-python-matrix.outputs.stable-python }} - uses: actions/setup-python@v6 + uses: actions/setup-python@v7 with: python-version: ${{ needs.gen-python-matrix.outputs.stable-python }} diff --git a/action.yaml b/action.yaml index 3f71ea3..605c787 100644 --- a/action.yaml +++ b/action.yaml @@ -70,6 +70,20 @@ runs: python -m pip uninstall -y MDAnalysis MDAnalysisTests done + # conda can leave behind partial dist-info directories when a pip + # install was overwritten by a conda install (e.g. pip-only files such + # as sboms/ in wheels from 2.11.0 on). These have no METADATA/RECORD, + # so pip can't uninstall them and fails on the next install. + python - <<'EOF' + import pathlib, shutil, sysconfig + for sp in {sysconfig.get_paths()[k] for k in ("purelib", "platlib")}: + for d in pathlib.Path(sp).glob("*.dist-info"): + name = d.name.split("-")[0].lower() + if name in ("mdanalysis", "mdanalysistests") and not (d / "METADATA").exists(): + print(f"Removing orphaned {d}") + shutil.rmtree(d) + EOF + - name: Setup install lines id: setup-install-line shell: ${{ inputs.shell }}