Skip to content

Commit

Permalink
Refactor GitHub Actions workflow to simplify dependency installation …
Browse files Browse the repository at this point in the history
…by using an installation script.
  • Loading branch information
michaelaye committed Nov 27, 2024
1 parent 87f6908 commit f6ccf0e
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,11 @@ jobs:
- name: Install dependencies
shell: bash -l {0}
run: |
# Install tomlkit first to read pyproject.toml
mamba install -y -c conda-forge tomlkit pip make
# Install tomlkit and sh first to run the installation script
mamba install -y -c conda-forge tomlkit sh
# Use Python to get dependencies from pyproject.toml
DEPS=$(python -c "
import tomlkit
with open('pyproject.toml', 'r') as f:
pyproject = tomlkit.load(f)
deps = pyproject['project']['dependencies']
dev_deps = pyproject['project']['optional-dependencies']['dev']
all_deps = deps + dev_deps
print(' '.join(all_deps))
")
# Install all dependencies
mamba install -y -c conda-forge $DEPS
# Run the installation script
python install_dev_deps.py
- name: Install package
shell: bash -l {0}
Expand Down

0 comments on commit f6ccf0e

Please sign in to comment.