-
Notifications
You must be signed in to change notification settings - Fork 0
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
20 additions
and
39 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
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 |
---|---|---|
|
@@ -4,16 +4,19 @@ inputs: | |
python-version: | ||
description: 'Python version to use' | ||
required: false | ||
default: '3.11' | ||
default: '3.12' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- uses: actions/setup-python@v4 | ||
- uses: actions/setup-python@v5 | ||
name: Setup Python | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
cache: 'pip' # caching pip dependencies | ||
|
||
- name: Install the latest version of uv | ||
uses: astral-sh/setup-uv@v3 | ||
with: | ||
version: "latest" | ||
- name: Git check | ||
run: | | ||
git config --global user.email "[email protected]" | ||
|
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
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 |
---|---|---|
|
@@ -22,66 +22,50 @@ jobs: | |
- ubuntu-latest | ||
- windows-latest | ||
python-version: | ||
- "3.8" | ||
- "3.9" | ||
- "3.10" | ||
- "3.11" | ||
- "3.12" | ||
- "3.13" | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
name: Checkout the repository | ||
with: | ||
fetch-depth: 0 | ||
- uses: ./.github/actions/setup-python-and-git | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Check git is working | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Testing Git" | ||
git --version | ||
git config --list | ||
- name: Install test dependencies | ||
run: pip install '.[test]' | ||
run: uv sync -p ${{ matrix.python-version }} --group test | ||
- name: Test | ||
run: coverage -m pytest && coverage xml | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v5 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: test-reports/coverage.xml | ||
flags: python-${{ matrix.python-version }} | ||
verbose: true # optional (default = false) | ||
env_vars: OS,PYTHON | ||
run: uv run pytest | ||
|
||
# Upload to Test PyPI. | ||
release-test-pypi: | ||
name: Publish in-dev package to test.pypi.org | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.PAT }} | ||
ref: ${{ github.head_ref }} | ||
|
||
- uses: actions/setup-python@v5 | ||
- uses: ./.github/actions/setup-python-and-git | ||
with: | ||
python-version: '3.11' | ||
cache: 'pip' # caching pip dependencies | ||
python-version: "3.12" | ||
|
||
- name: Install requirements | ||
shell: bash | ||
run: | | ||
python -m pip install --disable-pip-version-check --no-python-version-warning build | ||
python -m pip install --disable-pip-version-check --no-python-version-warning -e . | ||
uv pip install build | ||
uv pip install bump-my-version | ||
- name: Set dev version | ||
shell: bash | ||
run: | | ||
export PR_NUMBER=$(gh pr view --json number -q .number || echo "") | ||
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV | ||
echo "::notice::PR_NUMBER is: ${PR_NUMBER}" | ||
bump-my-version bump dev bumpversion/__init__.py --no-commit --no-tag --no-configured-files -v | ||
env: | ||
GH_TOKEN: ${{ secrets.PAT }} | ||
bump-my-version bump dev --no-commit --no-tag -v | ||
- name: Package | ||
shell: bash | ||
|