-
Notifications
You must be signed in to change notification settings - Fork 5
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
12 changed files
with
219 additions
and
231 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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# .github/workflows/build.yml | ||
name: Build | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Test"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
env: | ||
PY_COLORS: 1 | ||
PYTHON_VERSION: '3.12.6' | ||
steps: | ||
- name: Dump select GitHub event context | ||
run: | | ||
echo "github.ref=${{ github.ref }}" | ||
echo "github.event.head_commit=$HEAD_COMMIT" | ||
env: | ||
HEAD_COMMIT: ${{ toJson(github.event.head_commit) }} | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{env.PYTHON_VERSION}} | ||
|
||
- name: Install and configure Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
version: 1.8.3 | ||
# Get from poetry.toml | ||
# virtualenvs-create: false | ||
# prefer-active-python: true | ||
|
||
- name: Install poetry dependencies | ||
run: poetry install --no-root --with=dev --with=test | ||
|
||
- name: Add Dynamic Versioning Plugin | ||
run: | | ||
poetry self add poetry-dynamic-versioning[plugin] | ||
- name: Update the version | ||
run: | | ||
poetry dynamic-versioning | ||
echo "VERSION=$(poetry version --short)" | ||
- name: Build artifacts | ||
run: make twine-check | ||
|
||
- name: Store artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dist-files | ||
path: dist/* |
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# .github/workflows/publish.yml | ||
name: Publish after Build | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Build"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
publish: | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-22.04 | ||
env: | ||
PY_COLORS: 1 | ||
|
||
steps: | ||
- name: Download artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: dist-files | ||
path: ./dist | ||
|
||
# [1-publish-workflow] | ||
- name: Publish release candidate artifacts to TestPyPI | ||
if: contains(github.ref, 'rc') == true | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
repository_url: https://test.pypi.org/legacy/ | ||
user: __token__ | ||
password: ${{ secrets.PSEC_TEST_PYPI_PASSWORD }} | ||
packages-dir: ./dist | ||
verify-metadata: false | ||
|
||
- name: Publish tagged artifacts to PyPI | ||
if: contains(github.ref, 'rc') == false | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PSEC_PYPI_PASSWORD }} | ||
packages-dir: ./dist | ||
verify-metadata: false | ||
# ![1-publish-workflow] | ||
|
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# .github/workflows/test.yml | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
- 'feature/*' | ||
- 'hotfix/*' | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-22.04 | ||
env: | ||
PY_COLORS: 1 | ||
TOX_PARALLEL_NO_SPINNER: 1 | ||
PYTHON_VERSION: '3.12.6' | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{env.PYTHON_VERSION}} | ||
|
||
- name: Set up Conda | ||
uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
auto-activate-base: true | ||
python-version: ${{env.PYTHON_VERSION}} | ||
auto-update-conda: true | ||
|
||
- name: Install and configure Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
version: 1.8.3 | ||
# Get from poetry.toml | ||
# virtualenvs-create: false | ||
# prefer-active-python: true | ||
|
||
- name: Install poetry dependencies | ||
run: poetry install --no-root --with=dev --with=test | ||
|
||
- name: Install remaining dependencies | ||
run: | | ||
conda config --set always_yes yes --set changeps1 no | ||
make bats-libraries | ||
# Useful for debugging any issues with conda | ||
conda info -a | ||
- name: Add Dynamic Versioning Plugin | ||
run: | | ||
poetry self add poetry-dynamic-versioning[plugin] | ||
- name: Update the version | ||
run: | | ||
poetry dynamic-versioning | ||
echo "VERSION=$(poetry version --short)" | ||
# [1-test-workflow] | ||
- name: Run tests | ||
run: make test | ||
# ![1-test-workflow] | ||
|
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
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 |
---|---|---|
@@ -1 +1 @@ | ||
24.10.3 | ||
24.10.4 |
Oops, something went wrong.