Skip to content

Commit

Permalink
Use uv for installing requirements in actions (#960)
Browse files Browse the repository at this point in the history
* Use uv for installing requirements in actions

Signed-off-by: elronbandel <elron.bandel@ibm.com>

* try

Signed-off-by: elronbandel <elron.bandel@ibm.com>

* another try

Signed-off-by: elronbandel <elron.bandel@ibm.com>

* another try

Signed-off-by: elronbandel <elron.bandel@ibm.com>

* Update all

Signed-off-by: elronbandel <elron.bandel@ibm.com>

* another try

Signed-off-by: elronbandel <elron.bandel@ibm.com>

* another try

Signed-off-by: elronbandel <elron.bandel@ibm.com>

* Another try

Signed-off-by: elronbandel <elron.bandel@ibm.com>

* Fix coverage

Signed-off-by: elronbandel <elron.bandel@ibm.com>

* Fix

Signed-off-by: elronbandel <elron.bandel@ibm.com>

---------

Signed-off-by: elronbandel <elron.bandel@ibm.com>
  • Loading branch information
elronbandel committed Jun 30, 2024
1 parent 1242b02 commit d5441d5
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 40 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/catalog_consistency.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,9 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'pip' # caching pip dependencies
- run: pip install -r requirements/base.rqr
- run: pip install -r requirements/tests.rqr

- name: Install Unitxt From Source
run: pip install -e .

- run: curl -LsSf https://astral.sh/uv/install.sh | sh
- run: uv pip install --system -e ".[tests]"

- name: Run Tests
run: python utils/prepare_all_artifacts.py
7 changes: 3 additions & 4 deletions .github/workflows/catalog_preparation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'pip' # caching pip dependencies
- run: pip install -r requirements/base.rqr
- run: pip install -r requirements/tests.rqr
- run: pip install -e .

- run: curl -LsSf https://astral.sh/uv/install.sh | sh
- run: uv pip install --system ".[tests]"

- name: Run Tests
run: python -m unittest discover -s tests/catalog -p "test_*.py"
28 changes: 11 additions & 17 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,16 @@ jobs:
PYTHONPATH: ./docs

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'
cache: 'pip' # caching pip dependencies
- run: pip install -r requirements/base.rqr
- run: pip install -r requirements/docs.rqr

- name: Install package
run: |
pip install -e .
- name: Print Python Path
run: python -c "import sys; print(sys.path)"

- name: Compile Docs
run: make docs
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.9'

- run: curl -LsSf https://astral.sh/uv/install.sh | sh
- run: uv pip install --system ".[tests,docs]"

- name: Compile Docs
run: make docs


14 changes: 5 additions & 9 deletions .github/workflows/library_eager_execution_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,10 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'pip' # caching pip dependencies
- run: pip install -r requirements/base.rqr
- run: pip install -r requirements/tests.rqr
- run: pip install -e .
- run: pip install coverage[toml]
# cache: 'pip' # caching pip dependencies
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
- run: uv pip install --system ".[tests]"
- run: uv pip install --system coverage[toml]

- name: Run Tests
run: coverage run --omit=*/preparation -m unittest discover -s tests/library -p "test_*.py"

- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v2
run: coverage run --omit=*/preparation -m unittest discover -s tests/library -p "test_*.py"
7 changes: 3 additions & 4 deletions .github/workflows/library_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'pip' # caching pip dependencies
- run: pip install -r requirements/base.rqr
- run: pip install -r requirements/tests.rqr
- run: pip install -e .

- run: curl -LsSf https://astral.sh/uv/install.sh | sh
- run: uv pip install --system -e ".[tests]"
- run: pip install coverage[toml]

- name: Run Tests
Expand Down

0 comments on commit d5441d5

Please sign in to comment.