Skip to content

Commit

Permalink
wf/conda: try to make sure we install the built package
Browse files Browse the repository at this point in the history
Previously, conda would install from the pypdfium2-team channel instead
of using the built package we want to test.
  • Loading branch information
mara004 committed Nov 16, 2023
1 parent 8a438f8 commit 9e73c75
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/conda.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ defaults:
run:
shell: bash -el {0}

# TODO it would be nice to also support building both packages in one run and testing the helpers package with the newly-built raw package, but this may be failry complicated

jobs:

build:
Expand Down Expand Up @@ -90,29 +92,30 @@ jobs:
with:
auto-update-conda: true
python-version: ${{ matrix.py }}
channels: bblanchon,pypdfium2-team
channel-priority: strict

- name: Download artifact
uses: actions/download-artifact@v3
with:
name: conda_package
path: conda_dist/

- name: Install
- name: Show debug info
run: |
python -VV
ls -l conda_dist/
conda install -y pypdfium2_${{ inputs.package }} -c ./conda_dist/
- name: Test raw package
# according to the docs, --override-channels disables searching config file channels, and -c options priority decreases from left to right
- name: Install/Test raw package
if: inputs.package == 'raw'
run: python conda/raw/minitest.py
run: |
conda install -y pypdfium2_${{ inputs.package }} --override-channels -c ./conda_dist/ -c bblanchon
python conda/raw/minitest.py
- name: Test helpers package
- name: Install/Test helpers package
if: inputs.package == 'helpers'
run: |
conda install -y pytest pillow numpy
conda install -y pypdfium2_${{ inputs.package }} --override-channels -c ./conda_dist/ -c pypdfium2-team -c bblanchon
pytest tests/ tests_old/
publish:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ pypdfium2 includes helpers to simplify common use cases, while the raw PDFium/ct

Alternatively, with temporary channel config (discouraged):
```bash
conda install pypdfium2-team::pypdfium2_helpers -c bblanchon -c pypdfium2-team
conda install pypdfium2-team::pypdfium2_helpers --override-channels -c pypdfium2-team -c bblanchon
```

Adding the channels permanently and tightening priority is encouraged to include pypdfium2 in `conda update` by default, and to avoid accidentally replacing the install with a different channel. (If desired, you may limit the channel config to the current environment by adding `--env`.)
Otherwise, you should be cautious when making changes to the environment.

Expand Down

0 comments on commit 9e73c75

Please sign in to comment.