This repository has been archived by the owner on Oct 27, 2023. It is now read-only.
-
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
26 changed files
with
968 additions
and
834 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,34 @@ | ||
name: Setup Python and run Test | ||
description: Build and run tests | ||
|
||
inputs: | ||
python-version: | ||
description: "Python version to use" | ||
required: true | ||
default: "3.12" | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup Python ${{ inputs.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
|
||
- name: Install poetry | ||
shell: bash | ||
run: | | ||
set -e -x -o pipefail | ||
pip install poetry | ||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
set -e -x -o pipefail | ||
poetry install | ||
- name: Test | ||
shell: bash | ||
run: | | ||
poetry run black *.py --check --verbose --diff | ||
poetry run pytest |
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,53 @@ | ||
name: Validate and Publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }} | ||
|
||
jobs: | ||
build-branch: | ||
name: Build, branch, publish | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup and run tests | ||
uses: ./.github/actions/setup-and-run-tests | ||
|
||
- name: Get next version | ||
uses: reecetech/version-increment@2023.10.1 | ||
id: version | ||
with: | ||
scheme: calver | ||
|
||
- name: Set version | ||
shell: bash | ||
run: | | ||
set -e -x -o pipefail | ||
poetry version ${{ steps.version.outputs.version }} | ||
- name: Create release branch | ||
uses: EndBug/add-and-commit@v9.1.3 | ||
with: | ||
default_author: github_actor | ||
new_branch: release/${{ steps.version.outputs.version }} | ||
push: true | ||
|
||
- name: Build release | ||
shell: bash | ||
run: | | ||
set -e -x -o pipefail | ||
poetry build --format wheel | ||
- name: Upload release as artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: wheel | ||
path: dist/*.whl |
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,19 @@ | ||
name: Validation | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_call: | ||
|
||
jobs: | ||
validate: | ||
name: Validate | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Validate | ||
uses: ./.github/actions/setup-and-run-tests | ||
|
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
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
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
Oops, something went wrong.