38 lines
706 B
YAML
38 lines
706 B
YAML
name: Build Python Package
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.13"
|
|
|
|
- name: Run setup script
|
|
run: .gitea/scripts/setup-poetry.sh
|
|
|
|
- name: Check code formatting by black
|
|
run: |
|
|
poetry run black . --check
|
|
|
|
- name: Lint code by ruff
|
|
run: |
|
|
poetry run ruff .
|
|
|
|
- name: Check types by pyright
|
|
run: |
|
|
poetry run pyright
|
|
|
|
- name: Build package
|
|
run: poetry build
|