Skip to content

Commit

Permalink
refactor:use uv to speedup workflows (#619)
Browse files Browse the repository at this point in the history
* refactor:use uv to speedup workflows

* uv pip install --system

* uv pip install --system

* uv pip install --system
  • Loading branch information
JarbasAl authored Dec 6, 2024
1 parent c19d2f8 commit 6efd318
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 35 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/build_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
max-parallel: 2
matrix:
python-version: [ 3.7, 3.8, 3.9, "3.10", "3.11" ]
python-version: [3.8, 3.9, "3.10", "3.11]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -26,12 +26,11 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install Build Tools
run: |
python -m pip install build wheel
python -m pip install build wheel uv
- name: Install System Dependencies
run: |
sudo apt-get update
sudo apt install python3-dev swig libssl-dev libfann-dev portaudio19-dev libpulse-dev python3-fann2
python -m pip install build wheel
- name: Build Source Packages
run: |
python setup.py sdist
Expand All @@ -40,4 +39,4 @@ jobs:
python setup.py bdist_wheel
- name: Install package
run: |
pip install .[mycroft,lgpl,plugins,skills-essential,skills-extra,skills-audio,skills-gui,skills-internet,skills-media,skills-desktop]
uv pip install --system .[mycroft,lgpl,plugins,skills-essential,skills-extra,skills-audio,skills-gui,skills-internet,skills-media,skills-desktop]
30 changes: 15 additions & 15 deletions .github/workflows/end2end_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,25 @@ jobs:
run: |
sudo apt-get update
sudo apt install python3-dev swig libssl-dev
python -m pip install build wheel
python -m pip install build wheel uv
- name: Install test dependencies
run: |
pip install -r requirements/tests.txt
pip install ./test/integrationtests/common_query/ovos_tskill_fakewiki
pip install ./test/end2end/skill-ovos-hello-world
pip install ./test/end2end/skill-ovos-fallback-unknown
pip install ./test/end2end/skill-ovos-slow-fallback
pip install ./test/end2end/skill-converse_test
pip install ./test/end2end/skill-ovos-schedule
pip install ./test/end2end/skill-new-stop
pip install ./test/end2end/skill-old-stop
pip install ./test/end2end/skill-fake-fm
pip install ./test/end2end/skill-fake-fm-legacy
pip install ./test/end2end/skill-ovos-fakewiki
pip install ./test/end2end/metadata-test-plugin
uv pip install --system -r requirements/tests.txt
uv pip install --system ./test/integrationtests/common_query/ovos_tskill_fakewiki
uv pip install --system ./test/end2end/skill-ovos-hello-world
uv pip install --system ./test/end2end/skill-ovos-fallback-unknown
uv pip install --system ./test/end2end/skill-ovos-slow-fallback
uv pip install --system ./test/end2end/skill-converse_test
uv pip install --system ./test/end2end/skill-ovos-schedule
uv pip install --system ./test/end2end/skill-new-stop
uv pip install --system ./test/end2end/skill-old-stop
uv pip install --system ./test/end2end/skill-fake-fm
uv pip install --system ./test/end2end/skill-fake-fm-legacy
uv pip install --system ./test/end2end/skill-ovos-fakewiki
uv pip install --system ./test/end2end/metadata-test-plugin
- name: Install core repo
run: |
pip install -e .[plugins]
uv pip install --system -e .[plugins]
- name: Run end2end tests
run: |
pytest --cov-append --cov=ovos_core --cov-report xml test/end2end
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ jobs:
run: |
sudo apt-get update
sudo apt install python3-dev swig
python -m pip install build wheel
python -m pip install build wheel uv
- name: Install test dependencies
run: |
pip install -r requirements/tests.txt
pip install ./test/integrationtests/common_query/ovos_tskill_fakewiki
uv pip install --system -r requirements/tests.txt
uv pip install --system ./test/integrationtests/common_query/ovos_tskill_fakewiki
- name: Install core repo
run: |
pip install -e .[plugins]
uv pip install --system -e .[plugins]
- name: Run integration tests
run: |
pytest test/integrationtests
6 changes: 3 additions & 3 deletions .github/workflows/license_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ jobs:
python-version: 3.8
- name: Install Build Tools
run: |
python -m pip install build wheel
python -m pip install build wheel uv
- name: Install System Dependencies
run: |
sudo apt-get update
sudo apt install python3-dev swig libssl-dev libfann-dev portaudio19-dev libpulse-dev
- name: Install core repo
run: |
pip install .[mycroft,lgpl,skills-essential]
uv pip install --system .[mycroft,lgpl,skills-essential]
- name: Get explicit and transitive dependencies
run: |
pip freeze > requirements-all.txt
uv pip freeze > requirements-all.txt
- name: Check python
id: license_check_report
uses: pilosus/action-pip-license-checker@v0.5.0
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/mycroft_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ jobs:
run: |
sudo apt-get update
sudo apt install python3-dev swig libssl-dev portaudio19-dev libpulse-dev
python -m pip install build wheel
python -m pip install build wheel uv
- name: Install test dependencies
run: |
pip install -r requirements/tests.txt
uv pip install --system -r requirements/tests.txt
- name: Install core repo
run: |
pip install -e .[mycroft,plugins,deprecated]
uv pip install --system -e .[mycroft,plugins,deprecated]
- name: Run mycroft compat tests
run: |
pytest test/backwards_compat
4 changes: 2 additions & 2 deletions .github/workflows/pipaudit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install Build Tools
run: |
python -m pip install build wheel
python -m pip install build wheel uv
- name: Install System Dependencies
run: |
sudo apt-get update
sudo apt install python3-dev swig libssl-dev
- name: Install package
run: |
pip install .[skills-essential]
uv pip install --system .[skills-essential]
- uses: pypa/gh-action-pip-audit@v1.0.0
with:
# Ignore setuptools vulnerability we can't do much about
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,20 @@ jobs:
run: |
sudo apt-get update
sudo apt install python3-dev swig libssl-dev portaudio19-dev libpulse-dev
python -m pip install build wheel
python -m pip install build wheel uv
- name: Install test dependencies
run: |
pip install -r requirements/tests.txt
uv pip install --system -r requirements/tests.txt
- name: Install core repo
run: |
pip install -e .[mycroft,plugins]
uv pip install --system -e .[mycroft,plugins]
- name: Run unittests
run: |
pytest --cov=ovos_core --cov-report xml test/unittests
- name: Install padatious
run: |
sudo apt install libfann-dev
pip install .[lgpl]
uv pip install --system .[lgpl]
- name: Run unittests with padatious
run: |
pytest --cov-append --cov=ovos_core --cov-report xml test/unittests
Expand Down

0 comments on commit 6efd318

Please sign in to comment.