-
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.
Merge pull request #2 from zerlok/dev
prepare for first release
- Loading branch information
Showing
33 changed files
with
776 additions
and
503 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,19 @@ | ||
name: Publish Python Package | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
- uses: abatilo/actions-poetry@v2 | ||
- name: Poetry build | ||
run: poetry build -n | ||
- 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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Check On Pull Request | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [ "3.9", "3.10", "3.11", "3.12" ] | ||
protoc-version: [ "26.1" ] | ||
buf-version: [ "1.31.0" ] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
# see details (matrix, python-version, python-version-file, etc.) | ||
# https://github.com/actions/setup-python | ||
- name: Install poetry | ||
uses: abatilo/actions-poetry@v2 | ||
- name: Setup a local virtual environment (if no poetry.toml file) | ||
run: | | ||
poetry config virtualenvs.create true --local | ||
poetry config virtualenvs.in-project true --local | ||
- uses: actions/cache@v3 | ||
name: Define a cache for the virtual environment based on the dependencies lock file | ||
with: | ||
path: ./.venv | ||
key: venv-${{ hashFiles('poetry.lock') }} | ||
- name: Install the project dependencies | ||
run: poetry install --all-extras | ||
- name: Download protoc ${{ matrix.protoc-version }} | ||
run: wget -q -O protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v${{ matrix.protoc-version }}/protoc-${{ matrix.protoc-version }}-linux-x86_64.zip" | ||
- name: Unzip protoc ${{ matrix.protoc-version }} | ||
run: unzip -q -n protoc.zip 'bin/*' 'include/google/protobuf/*' -d .venv | ||
- name: Download buf ${{ matrix.buf-version }} | ||
run: wget -q -O .venv/bin/buf "https://github.com/bufbuild/buf/releases/download/v${{ matrix.buf-version }}/buf-Linux-x86_64" | ||
- name: Allow run buf ${{ matrix.buf-version }} | ||
run: chmod +x .venv/bin/buf | ||
- name: Run mypy | ||
run: poetry run mypy | ||
- name: Run pytest | ||
run: poetry run pytest | ||
- name: Run ruff format | ||
run: poetry run ruff format --check | ||
- name: Run ruff format | ||
run: poetry run ruff format --check |
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.