Skip to content

Commit 4908504

Browse files
committed
Update development dependencies and enhance CI workflow
- Add 'planets' to the pip installation script in install_dev_deps.py. - Include 'sh' in the development dependencies in pyproject.toml for shell command execution. - Modify GitHub Actions workflow to support multiple Python versions and improve environment activation naming.
1 parent 7fec873 commit 4908504

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

.github/workflows/test.yaml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@ on:
99

1010
jobs:
1111
test:
12-
name: Run tests
12+
name: Python ${{ matrix.python-version }} tests
1313
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
python-version: ["3.9", "3.10"]
17+
fail-fast: false
18+
1419
steps:
1520
- name: Checkout repository
1621
uses: actions/checkout@v4
@@ -20,9 +25,9 @@ jobs:
2025
with:
2126
miniforge-variant: Miniforge3
2227
miniforge-version: latest
23-
activate-environment: test_env
28+
activate-environment: test_env_py${{ matrix.python-version }}
2429
use-mamba: true
25-
python-version: "3.9"
30+
python-version: ${{ matrix.python-version }}
2631
channels: conda-forge
2732
channel-priority: strict
2833
auto-activate-base: false
@@ -42,8 +47,8 @@ jobs:
4247
- name: Install dependencies
4348
shell: bash -l {0}
4449
run: |
45-
# Install tomlkit and sh first to run the installation script
46-
mamba install -y -c conda-forge tomlkit sh
50+
# Install tomlkit to run the installation script (other deps will be installed by the script)
51+
mamba install -y -c conda-forge tomlkit
4752
4853
# Run the installation script
4954
python install_dev_deps.py
@@ -63,4 +68,5 @@ jobs:
6368
with:
6469
token: ${{ secrets.CODECOV_TOKEN }}
6570
files: ./coverage.xml
66-
fail_ci_if_error: true
71+
fail_ci_if_error: true
72+
name: codecov-py${{ matrix.python-version }}

install_dev_deps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import tomlkit
77

88
# Define packages that should be installed via pip instead of conda
9-
PIP_PACKAGES = {"build", "pip-tools"}
9+
PIP_PACKAGES = {"build", "pip-tools", "planets"}
1010

1111

1212
def install_deps():

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ dev = [
5656
"build",
5757
"twine",
5858
"pip-tools",
59+
"sh", # For running shell commands from Python
5960
]
6061

6162
[project.scripts]

0 commit comments

Comments
 (0)