-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: extend pyproject.toml * refactor: migrating from setup.py to pyproject.toml only * refactor: unfreeze optional dependencies * ci: setup new workflow for checks using tox and uv * fix: fix genproto and release workflows * review fixes * ci: using conventional commits pre-commit hook * fix: fix release workflow --------- Co-authored-by: Islam Alibekov <[email protected]>
- Loading branch information
1 parent
c5844ac
commit 3c7c5e4
Showing
16 changed files
with
1,852 additions
and
1,508 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,42 @@ | ||
name: Checks | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
check: | ||
name: Check ${{ matrix.env }} on Python ${{ matrix.python-version }} | ||
runs-on: ubuntu-latest | ||
|
||
timeout-minutes: 10 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
env: | ||
- "style" | ||
- "format" | ||
- "type" | ||
python-version: | ||
- "3.12" | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install uv | ||
uses: astral-sh/setup-uv@v4 | ||
with: | ||
# Install a specific version of uv. | ||
version: "0.5.8" | ||
enable-cache: true | ||
|
||
- name: Install tox | ||
run: uv tool install --python-preference only-managed --python ${{ matrix.python-version }} tox --with tox-uv --with tox-gh | ||
|
||
- name: Install Python ${{ matrix.python-version }} | ||
run: uv python install --python-preference only-managed ${{ matrix.python-version }} | ||
|
||
- name: Run ${{ matrix.env }} | ||
run: make tox | ||
env: | ||
TOX_GH_MAJOR_MINOR: ${{ matrix.env }} |
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 |
---|---|---|
|
@@ -17,6 +17,13 @@ jobs: | |
with: | ||
token: ${{ secrets.YANDEX_CLOUD_BOT_TOKEN }} | ||
|
||
- name: Install uv | ||
uses: astral-sh/setup-uv@v4 | ||
with: | ||
# Install a specific version of uv. | ||
version: "0.5.8" | ||
enable-cache: true | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
|
@@ -29,7 +36,7 @@ jobs: | |
make proto | ||
make deps | ||
make tox | ||
git config --global user.name 'Yandex.Cloud Bot' | ||
git config --global user.email '[email protected]' | ||
git add yandex cloudapi | ||
|
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 |
---|---|---|
|
@@ -19,6 +19,13 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install uv | ||
uses: astral-sh/setup-uv@v4 | ||
with: | ||
# Install a specific version of uv. | ||
version: "0.5.8" | ||
enable-cache: true | ||
|
||
- name: Set up Python | ||
uses: actions/[email protected] | ||
with: | ||
|
@@ -37,9 +44,9 @@ jobs: | |
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build python | ||
- name: Build yandexcloud | ||
run: | | ||
python3 setup.py sdist bdist_wheel | ||
make build | ||
- name: Publish package distributions to PyPI | ||
uses: pypa/[email protected] | ||
|
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,45 @@ | ||
name: Tests | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
test: | ||
name: Run tests with Python ${{ matrix.env }} on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 10 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
env: | ||
# uncomment when upgrade grpcio-tools, current version does not work with 3.13 | ||
# - "3.13" | ||
- "3.12" | ||
- "3.11" | ||
- "3.10" | ||
- "3.9" | ||
os: | ||
- ubuntu-latest | ||
# - macos-latest | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install uv | ||
uses: astral-sh/setup-uv@v4 | ||
with: | ||
# Install a specific version of uv. | ||
version: "0.5.8" | ||
enable-cache: true | ||
|
||
- name: Install tox | ||
run: uv tool install --python-preference only-managed --python ${{ matrix.env }} tox --with tox-uv --with tox-gh | ||
|
||
- name: Install Python | ||
run: uv python install --python-preference only-managed ${{ matrix.env }} | ||
|
||
- name: Run test suite | ||
run: make tox | ||
env: | ||
TOX_GH_MAJOR_MINOR: ${{ matrix.env }} |
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,16 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: "v5.0.0" | ||
hooks: | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/compilerla/conventional-pre-commit | ||
rev: "v3.6.0" | ||
hooks: | ||
- id: conventional-pre-commit | ||
stages: [commit-msg] | ||
args: [] |
Oops, something went wrong.