@@ -17,30 +17,29 @@ jobs:
1717 fail-fast : false
1818 matrix :
1919 python-version :
20- - 3.9
20+ - ' 3.9'
2121 - ' 3.10'
2222 - ' 3.11'
2323 - ' 3.12'
24+ - ' 3.13'
2425 steps :
2526 - uses : actions/checkout@v2
26- - name : Set up Python ${{ matrix.python-version }}
27- uses : actions /setup-python@v2
27+ - name : Install uv
28+ uses : astral-sh /setup-uv@v6
2829 with :
2930 python-version : ${{ matrix.python-version }}
31+ # Install dev dependencies
3032 - name : Install dependencies
31- run : |
32- python -m pip install --upgrade pip
33- pip install -r requirements.txt
34- pip install -r test_requirements.txt
33+ run : uv sync --locked
3534 - name : Pre-commit checks
36- run : pre-commit run --all-files
35+ run : uv run pre-commit run --all-files
3736 - name : Test with pytest
3837 # Create the ssh key file once for all testing
3938 run : |
4039 ssh-keygen -t ecdsa -m PEM -N '' -f /tmp/buildrunner-test-id_rsa
41- pytest -v -m "not serial" --numprocesses=auto --junitxml=test-reports/non-serial-test-results.xml
42- pytest -v -m "serial" --junitxml=test-reports/serial-test-results.xml
43- python scripts/combine_xml.py test-reports/serial-test-results.xml test-reports/non-serial-test-results.xml > test-reports/test-result.xml
40+ uv run pytest -v -m "not serial" --numprocesses=auto --junitxml=test-reports/non-serial-test-results.xml
41+ uv run pytest -v -m "serial" --junitxml=test-reports/serial-test-results.xml
42+ uv run python scripts/combine_xml.py test-reports/serial-test-results.xml test-reports/non-serial-test-results.xml > test-reports/test-result.xml
4443 - name : Publish test results
4544 uses : EnricoMi/publish-unit-test-result-action/linux@v2
4645 if : always()
@@ -60,15 +59,15 @@ jobs:
6059 with :
6160 # Fetch all history instead of the latest commit
6261 fetch-depth : 0
62+ - name : Install uv
63+ uses : astral-sh/setup-uv@v6
64+ with :
65+ python-version : 3.9
6366 - name : Install dependencies
64- run : |
65- python -m pip install --upgrade pip
66- pip install -r requirements.txt
67- - name : Write version file
68- run : python scripts/write-version.py
67+ run : uv sync --locked
6968 - name : Get current version
7069 id : version-number
71- run : echo "CURRENT_VERSION=$( python -c 'from buildrunner.version import __version__; print(__version__)' )" >> $GITHUB_OUTPUT
70+ run : echo "CURRENT_VERSION=$(uv version --short).$(git rev-list --count HEAD )" >> $GITHUB_OUTPUT
7271 - name : Print current version
7372 run : echo CURRENT_VERSION ${{ steps.version-number.outputs.CURRENT_VERSION }}
7473 tag-commit :
@@ -91,24 +90,18 @@ jobs:
9190 with :
9291 # Fetch all history instead of the latest commit
9392 fetch-depth : 0
94- - name : Set up Python
95- uses : actions /setup-python@v2
93+ - name : Install uv
94+ uses : astral-sh /setup-uv@v6
9695 with :
9796 python-version : 3.9
9897 - name : Install dependencies
99- run : |
100- python -m pip install --upgrade pip
101- pip install -r requirements.txt
102- pip install wheel build
103- - name : Remove version file
104- # This is just in case something else created it, destroy it to get a fresh version
105- run : rm -f buildrunner/version.py
106- - name : Write version file
107- run : python scripts/write-version.py
98+ run : uv sync --locked
99+ - name : Set version
100+ run : uv version --no-sync "$(uv version --short).$(git rev-list --count HEAD)"
108101 - name : Build
109- run : python -m build
102+ run : uv build
110103 - name : Check upload
111- run : pip install twine && twine check dist/*
104+ run : uv run --with twine twine check dist/*
112105 - name : Publish to PyPi
113106 uses : pypa/gh-action-pypi-publish@release/v1
114107 # Only publish on pushes to main
0 commit comments