Skip to content

Commit f341e03

Browse files
authored
use uv setup actions in github actions
1 parent e14b85c commit f341e03

File tree

3 files changed

+9
-34
lines changed

3 files changed

+9
-34
lines changed

.github/workflows/scheduled_unittests.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,11 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- uses: actions/checkout@master
19-
20-
- name: Setup Python
21-
uses: actions/setup-python@master
22-
with:
23-
python-version: "3.12"
24-
25-
- name: Install dependencies
26-
run: |
27-
pip3 install --upgrade pip
28-
pip3 install --upgrade setuptools
29-
pip3 install --upgrade wheel
30-
pip3 install ".[dev]"
31-
19+
- name: Install uv and set the python version
20+
uses: astral-sh/setup-uv@v5
3221
- name: Run unit tests
3322
run: |
3423
git config --global user.name "Github Action"
3524
git config --global user.email "[email protected]"
36-
pytest
25+
uv run pytest
3726

.github/workflows/unittests.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,14 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@master
1515

16-
- name: Setup Python
17-
uses: actions/setup-python@master
16+
- name: Install uv and set the python version
17+
uses: astral-sh/setup-uv@v5
1818
with:
1919
python-version: ${{ matrix.python-version }}
2020

21-
- name: Install dependencies
22-
run: |
23-
pip3 install --upgrade pip
24-
pip3 install --upgrade setuptools
25-
pip3 install --upgrade wheel
26-
pip3 install ".[dev]"
27-
2821
- name: Run unit tests
2922
run: |
3023
git config --global user.name "Github Action"
3124
git config --global user.email "[email protected]"
32-
pytest --cov=mkdocs_git_revision_date_localized_plugin --cov-report=xml
25+
uv run pytest --cov=mkdocs_git_revision_date_localized_plugin --cov-report=xml
3326

.github/workflows/unittests_codecov.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,16 @@ jobs:
2121
steps:
2222
- uses: actions/checkout@master
2323

24-
- name: Setup Python
25-
uses: actions/setup-python@master
24+
- name: Install uv and set the python version
25+
uses: astral-sh/setup-uv@v5
2626
with:
2727
python-version: ${{ matrix.python-version }}
2828

29-
- name: Install dependencies
30-
run: |
31-
pip3 install --upgrade pip
32-
pip3 install --upgrade setuptools
33-
pip3 install --upgrade wheel
34-
pip3 install ".[dev]"
35-
3629
- name: Generate coverage report
3730
run: |
3831
git config --global user.name "Github Action"
3932
git config --global user.email "[email protected]"
40-
pytest --cov=mkdocs_git_revision_date_localized_plugin --cov-report=xml
33+
uv run pytest --cov=mkdocs_git_revision_date_localized_plugin --cov-report=xml
4134
4235
- name: Upload coverage to Codecov
4336
if: "contains(env.USING_COVERAGE, matrix.python-version)"

0 commit comments

Comments
 (0)