Some checks failed
Build Python Package / build (push) Failing after 1m19s
63 lines
1.4 KiB
YAML
63 lines
1.4 KiB
YAML
name: Build Python Package
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
container: catthehacker/ubuntu:act-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.13.1"
|
|
cache: "pip"
|
|
|
|
- name: Load cached Poetry installation
|
|
id: cached-poetry
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.local
|
|
key: poetry-0 # increment to reset cache
|
|
|
|
- name: Install and configure Poetry
|
|
if: steps.cached-poetry.outputs.cache-hit != 'true'
|
|
uses: snok/install-poetry@v1
|
|
with:
|
|
virtualenvs-create: false
|
|
installer-parallel: true
|
|
|
|
- name: Validate the structure of the pyproject.toml
|
|
run: |
|
|
poetry check
|
|
|
|
- name: Verify that poetry.lock is consistent with pyproject.toml
|
|
run: |
|
|
poetry check --lock
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
poetry install
|
|
|
|
- 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
|