Skip to content

Commit

Permalink
FIX: run additiona pytest worfklows with setup-uv
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Oct 18, 2024
1 parent bb9f5ec commit f3720c1
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 16 deletions.
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
"nowrap",
"nrows",
"nsimplify",
"numprocesses",
"numpycode",
"pandoc",
"pbar",
Expand Down
31 changes: 22 additions & 9 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,31 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: ComPWA/actions/pip-install@v1
- uses: actions/setup-python@v5
with:
editable: "yes"
extras: test,all
python-version: "3.9"
specific-packages: ${{ inputs.specific-pip-packages }}
python-version: "3.12"
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- id: with
if: inputs.specific-pip-packages
name: Determine additional packages to install
run: |
additional_packages=''
for package in ${{ inputs.specific-pip-packages }}; do
additional_packages="$additional_packages --with $package"
done
echo "packages=$additional_packages" | tee -a $GITHUB_OUTPUT
- name: Run pytest-benchmark
run: |
pytest \
-k benchmark \
--benchmark-json output.json \
--durations=0
uv run \
--extra all \
--extra test \
${{ steps.with.outputs.packages }} \
pytest \
-k benchmark \
--benchmark-json output.json \
--durations=0
working-directory: benchmarks
- name: Store result
if: github.event_name == 'push'
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/ci-qrules-v0.9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,15 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: ComPWA/actions/pip-install@v1
- uses: actions/setup-python@v5
with:
additional-packages: tox
editable: "yes"
extras: test
python-version: "3.9"
specific-packages: qrules==0.9.*
- run: pytest -n auto
python-version: "3.12"
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: Run pytest with QRules v0.9
run: |
uv run \
--extra test \
--with qrules~=0.9.0 \
pytest --numprocesses auto

0 comments on commit f3720c1

Please sign in to comment.