Skip to content

Commit bf81924

Browse files
authored
Split conda test out into separate workflow (#522)
* Split workflows to test from pip vs. conda install. * Install rclone. * Fix install. * Use --help not --version. * Change conda running to test in PR. * Fix running --help. * Extend python versions for conda workflow. * Remove run conda install on PRs now that it has been checked. * Fix comment. * Apply review feedback. * Remove run on PR schedule (for testing) in conda workflow.
1 parent 8f8aa90 commit bf81924

2 files changed

Lines changed: 42 additions & 5 deletions

File tree

.github/workflows/code_test_and_deploy.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,16 @@ jobs:
4545
auto-update-conda: true
4646
channels: conda-forge
4747
activate-environment: "datashuttle-test"
48-
- name: Install datashuttle with conda
48+
49+
# The recommended installation is via conda, but we need to test
50+
# against dependencies from the pyproject.toml on the branch
51+
# to ensure dependency changes in a PR are reflected.
52+
- name: Install rclone
4953
run: |
5054
conda activate datashuttle-test
51-
conda install -c conda-forge datashuttle
52-
- name: Install local datashuttle for testing
55+
conda install -c conda-forge rclone
56+
- name: Install datashuttle from repo
5357
run: |
54-
# --force will only uninstall datashuttle not dependencies
55-
conda uninstall datashuttle --force
5658
python -m pip install --upgrade pip
5759
pip install .[dev]
5860
- name: Test
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# As conda is the recommended installation method, run weekly checks
2+
# to ensure
3+
name: conda install check
4+
5+
on:
6+
schedule:
7+
# Weekly cron job at 12:00 AM UTC on Mondays.
8+
- cron: '0 0 * * 1'
9+
10+
jobs:
11+
conda_install_check:
12+
name: Conda install check (${{ matrix.os }} py${{ matrix.python-version }})
13+
runs-on: ${{ matrix.os }}
14+
15+
strategy:
16+
matrix:
17+
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
18+
python-version: ["3.9", "3.10", "3.11", "3.12"]
19+
20+
defaults:
21+
run:
22+
shell: bash -l {0} # Required for conda activation
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: conda-incubator/setup-miniconda@v3
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
auto-update-conda: true
30+
channels: conda-forge
31+
activate-environment: "datashuttle-test"
32+
- name: Check conda installation
33+
run: |
34+
conda install -c conda-forge datashuttle
35+
datashuttle --help

0 commit comments

Comments
 (0)