diff --git a/.github/workflows/code_test_and_deploy.yml b/.github/workflows/code_test_and_deploy.yml index 49054c6b1..52975585f 100644 --- a/.github/workflows/code_test_and_deploy.yml +++ b/.github/workflows/code_test_and_deploy.yml @@ -45,14 +45,16 @@ jobs: auto-update-conda: true channels: conda-forge activate-environment: "datashuttle-test" - - name: Install datashuttle with conda + + # The recommended installation is via conda, but we need to test + # against dependencies from the pyproject.toml on the branch + # to ensure dependency changes in a PR are reflected. + - name: Install rclone run: | conda activate datashuttle-test - conda install -c conda-forge datashuttle - - name: Install local datashuttle for testing + conda install -c conda-forge rclone + - name: Install datashuttle from repo run: | - # --force will only uninstall datashuttle not dependencies - conda uninstall datashuttle --force python -m pip install --upgrade pip pip install .[dev] - name: Test diff --git a/.github/workflows/conda_install_check.yml b/.github/workflows/conda_install_check.yml new file mode 100644 index 000000000..5d411615e --- /dev/null +++ b/.github/workflows/conda_install_check.yml @@ -0,0 +1,35 @@ +# As conda is the recommended installation method, run weekly checks +# to ensure +name: conda install check + +on: + schedule: + # Weekly cron job at 12:00 AM UTC on Mondays. + - cron: '0 0 * * 1' + +jobs: + conda_install_check: + name: Conda install check (${{ matrix.os }} py${{ matrix.python-version }}) + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-13, macos-14] + python-version: ["3.9", "3.10", "3.11", "3.12"] + + defaults: + run: + shell: bash -l {0} # Required for conda activation + + steps: + - uses: actions/checkout@v4 + - uses: conda-incubator/setup-miniconda@v3 + with: + python-version: ${{ matrix.python-version }} + auto-update-conda: true + channels: conda-forge + activate-environment: "datashuttle-test" + - name: Check conda installation + run: | + conda install -c conda-forge datashuttle + datashuttle --help