Skip to content

Commit

Permalink
CI: Use "uv" to speed-up Python package installations
Browse files Browse the repository at this point in the history
* Use workaround to use "uv" for Python3

ADDED:

* test-pyp27.yml: Check basic Python 2.7 support
  • Loading branch information
jenisys committed May 27, 2024
1 parent e88424c commit 5c3fcb9
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 3 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/test-pypy27.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# -- TEST-VARIANT: pypy-27 on ubuntu-latest
# BASED ON: test.yml
# DESCRIPTION: Checks for Python 2.7 support and any problems

name: test-pypy27
on:
workflow_dispatch:
push:
branches: [ "main", "release/**" ]
pull_request:
types: [opened, reopened, review_requested]
branches: [ "main" ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["pypy-2.7"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'py.requirements/*.txt'

- name: Install Python package dependencies
run: |
python -m pip install -U pip setuptools wheel
pip install --upgrade -r py.requirements/ci.github.testing.txt
pip install -e .
- name: Run tests
run: pytest
- name: Upload test reports
uses: actions/upload-artifact@v4
with:
name: test reports
path: |
build/testing/report.xml
build/testing/report.html
if: ${{ job.status == 'failure' }}
# MAYBE: if: ${{ always() }}
4 changes: 1 addition & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SEE: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
# SUPPORTED PYTHON VERSIONS: https://github.com/actions/python-versions

name: tests
name: test
on:
workflow_dispatch:
push:
Expand Down Expand Up @@ -35,8 +35,6 @@ jobs:
- name: "Install Python package dependencies (with: uv)"
run: |
python -m pip install -U uv
uv --verbose pip install -U pip setuptools wheel
# -- WORKAROUND:
python -m uv pip install -U pip setuptools wheel
python -m uv pip install --upgrade -r py.requirements/ci.github.testing.txt
python -m uv pip install -e .
Expand Down

0 comments on commit 5c3fcb9

Please sign in to comment.