diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 0f1e6e5..5de8a85 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -78,6 +78,13 @@ jobs: uses: ./setup-cargo-bundle-licenses - run: cargo bundle-licenses --version + update_conda_lockfiles: + if: ${{ github.ref_name != 'update-conda-lockfiles' }} + uses: ./.github/workflows/update-conda-lockfiles.yaml + with: + branch: ${{ github.ref_name }} + path: test/update-conda-lockfile + tests_complete: name: All tests if: always() @@ -87,6 +94,7 @@ jobs: - setup_uv_lockfile - setup_mdbook - setup_cargo_bundle_licenses + - update_conda_lockfiles runs-on: ubuntu-latest steps: diff --git a/test/update-conda-lockfile/environment.yaml b/test/update-conda-lockfile/environment.yaml new file mode 100644 index 0000000..707fe06 --- /dev/null +++ b/test/update-conda-lockfile/environment.yaml @@ -0,0 +1,4 @@ +channels: +- conda-forge +dependencies: +- python==3.12 diff --git a/test/update-conda-lockfile/update-lockfiles.sh b/test/update-conda-lockfile/update-lockfiles.sh new file mode 100755 index 0000000..4e18b19 --- /dev/null +++ b/test/update-conda-lockfile/update-lockfiles.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Execute this script to update all lock files to the latest versions of dependencies. + +rm *-conda-lock.yml + +for python_version in 3.12 +do + sed "s/python==.*/python=$python_version/g" environment.yaml > tmp.yaml || exit 2 + conda lock -f tmp.yaml -p osx-arm64 -p osx-64 -p linux-64 --lockfile py${python_version//.}-conda-lock.yml || exit 2 +done +rm tmp.yaml