Skip to content

Commit

Permalink
Test update-conda-lockfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
joaander committed Jun 25, 2024
1 parent 9cece03 commit ef3e459
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -87,6 +94,7 @@ jobs:
- setup_uv_lockfile
- setup_mdbook
- setup_cargo_bundle_licenses
- update_conda_lockfiles
runs-on: ubuntu-latest

steps:
Expand Down
4 changes: 4 additions & 0 deletions test/update-conda-lockfile/environment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
channels:
- conda-forge
dependencies:
- python==3.12
12 changes: 12 additions & 0 deletions test/update-conda-lockfile/update-lockfiles.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit ef3e459

Please sign in to comment.