Skip to content

[pre-commit.ci] pre-commit autoupdate (#39) #597

[pre-commit.ci] pre-commit autoupdate (#39)

[pre-commit.ci] pre-commit autoupdate (#39) #597

Workflow file for this run

name: ci
on: [push, pull_request]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
requirements:
# Ubunty latest @ 13-Sep-23:
# Ubuntu 22.04.3 LTS | Python 3.10.12 | Pipx 1.2.0 | No poetry | PostgreSQL 14.9
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: python -m pipx install poetry
- name: Set up Python version from Poetry config
uses: actions/setup-python@v4
with:
python-version-file: 'pyproject.toml'
cache: 'poetry' # caching poetry dependencies
# Warning: poetry cache is not found
- name: Requirements check
run: poetry install --no-interaction
lint:
runs-on: ubuntu-latest
needs: [requirements]
steps:
- uses: actions/checkout@v4
- run: python -m pipx install poetry
- name: Set up Python version from Poetry config
uses: actions/setup-python@v4
with:
python-version-file: 'pyproject.toml'
cache: 'poetry' # caching poetry dependencies
# Warning: poetry cache is not found
- run: poetry install --only dev --no-interaction
- name: Ruff linting
uses: chartboost/ruff-action@v1
with:
args: --config=pyproject.toml
format:
runs-on: ubuntu-latest
needs: [requirements]
steps:
- uses: actions/checkout@v4
- run: python -m pipx install poetry
- name: Set up Python version from Poetry config
uses: actions/setup-python@v4
with:
python-version-file: 'pyproject.toml'
cache: 'poetry' # caching poetry dependencies
# Warning: poetry cache is not found
- run: poetry install --only dev --no-interaction
- name: Black style formatting
uses: psf/black@stable
with:
options: --check --diff --color --config=pyproject.toml
# env:
# CHANGED_FILES: ${{ steps.file_changes.outputs.added_modified }}
test:
runs-on: ubuntu-latest
needs: [lint, format]
steps:
- uses: actions/checkout@v4
- run: python -m pipx install poetry
- name: Set up Python version from Poetry config
uses: actions/setup-python@v4
with:
python-version-file: 'pyproject.toml'
cache: 'poetry' # caching poetry dependencies
# Warning: poetry cache is not found
- run: poetry install --only dev --no-interaction
- name: Unit testing
run: |
python -V
poetry -V
# poetry run pytest
build:
runs-on: ubuntu-latest
needs: [test]
steps:
- uses: actions/checkout@v4
- run: python -m pipx install poetry
- name: Set up Python version from Poetry config
uses: actions/setup-python@v4
with:
python-version-file: 'pyproject.toml'
cache: 'poetry' # caching poetry dependencies
# Warning: poetry cache is not found
- run: poetry install
- name: Build
run: |
python -V
poetry -V