1- # This workflow will install Python dependencies, run tests and lint with a single version of Python
1+ # This workflow will install Python dependencies and run tests in multiple versions of Python
22# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33
44name : tests
@@ -25,31 +25,16 @@ jobs:
2525
2626 steps :
2727 - uses : actions/checkout@v3
28- - name : Set up Python
29- uses : actions /setup-python@v3
28+ - name : Install uv and set the python version
29+ uses : astral-sh /setup-uv@v6
3030 with :
3131 python-version : ${{ matrix.python-version }}
32- - name : Install the latest version of uv
33- uses : astral-sh/setup-uv@v5
34- with :
35- version : " latest"
36- - name : Install Poetry
37- uses : snok/install-poetry@v1
38- with :
39- version : ' latest'
4032 - name : Install test dependencies
4133 run : |
42- poetry self add poetry-plugin-export
43- poetry export -f requirements.txt --extras dev --without-hashes --output requirements-dev.txt
44- echo "numpy${{ matrix.numpy-version }}" >> constraints.txt
45- uv pip compile requirements-dev.txt --output-file requirements.txt \
46- --python-version ${{ matrix.python-version }} \
47- --override constraints.txt
48- poetry run pip install -r requirements.txt
49- poetry install --only-root
50- - name : Test with pytest
51- run : |
52- poetry run pytest --cov-report xml --cov=bayes_opt/
34+ uv sync --extra dev
35+ uv add "numpy${{ matrix.numpy-version}}"
36+ - name : Run pytest
37+ run : uv run pytest --cov-report xml --cov=bayes_opt/
5338 - name : Upload coverage to Codecov
5439 uses : codecov/codecov-action@v4
5540 with :
0 commit comments