-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
11 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ on: | |
branches: [main] | ||
workflow_dispatch: | ||
env: | ||
LATEST_PY_VERSION: '3.11' | ||
LATEST_PY_VERSION: '3.12' | ||
COVERAGE_ARGS: '--cov --cov-report=term --cov-report=xml' | ||
XDIST_ARGS: '--numprocesses=auto' | ||
|
||
|
@@ -26,9 +26,7 @@ jobs: | |
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- uses: snok/[email protected] | ||
with: | ||
virtualenvs-in-project: true | ||
- uses: yezz123/setup-uv@v4 | ||
|
||
# Cache packages per python version, and reuse until lockfile changes | ||
- name: Cache python packages | ||
|
@@ -39,11 +37,11 @@ jobs: | |
key: venv-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }} | ||
- name: Install dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: poetry install -v -E all | ||
run: uv sync | ||
|
||
# Run tests with coverage report | ||
- name: Run tests | ||
run: poetry run pytest -rs -x -vv ${{ env.XDIST_ARGS }} ${{ env.COVERAGE_ARGS }} | ||
run: uv run pytest -rs -x -vv ${{ env.XDIST_ARGS }} ${{ env.COVERAGE_ARGS }} | ||
|
||
# Latest python version: send coverage report to codecov | ||
- name: "Upload coverage report to Codecov" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ on: | |
required: false | ||
default: '' | ||
env: | ||
LATEST_PY_VERSION: '3.11' | ||
LATEST_PY_VERSION: '3.12' | ||
|
||
jobs: | ||
# Deploy stable builds on tags only, and pre-release builds from manual trigger ("workflow_dispatch") | ||
|
@@ -27,10 +27,9 @@ jobs: | |
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ env.LATEST_PY_VERSION }} | ||
- uses: snok/[email protected] | ||
with: | ||
virtualenvs-in-project: true | ||
- uses: yezz123/setup-uv@v4 | ||
|
||
# TODO: | ||
- name: Set pre-release version | ||
if: ${{ !startsWith(github.ref, 'refs/tags/v') }} | ||
env: | ||
|
@@ -41,7 +40,7 @@ jobs: | |
poetry version | ||
- name: Build package distributions | ||
run: poetry build | ||
run: uvx --from build pyproject-build --installer uv | ||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ eggs | |
lib | ||
lib64 | ||
parts | ||
scratch | ||
sdist | ||
var | ||
venv/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters