Skip to content

Implement various improvements and fixes #326

Implement various improvements and fixes

Implement various improvements and fixes #326

Workflow file for this run

name: Check Backend
on:
push:
paths:
- .github/workflows/api.yaml
- API/**
branches:
- main
pull_request:
paths:
- .github/workflows/api.yaml
- API/**
defaults:
run:
working-directory: API
shell: bash
jobs:
lint:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Configure Poetry cache
uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.cache/pypoetry
~/.local/share/pypoetry
~/.local/bin/poetry
./.ruff_cache
key: ${{ runner.os }}-poetry-lint-${{ hashFiles('**/poetry.lock') }}
restore-keys: ${{ runner.os }}-poetry-lint-
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python -
~/.local/bin/poetry config virtualenvs.create false
echo "~/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: poetry install --extras sentry
- name: Lint the project with ruff check
if: always()
run: ruff check --output-format=github
- name: Lint the project with ruff format
if: always()
run: ruff format --check
typecheck:
name: Typechecking
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Configure Poetry cache
uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.cache/pypoetry
~/.local/share/pypoetry
~/.local/bin/poetry
./.mypy_cache
key: ${{ runner.os }}-poetry-typecheck-${{ hashFiles('**/poetry.lock') }}
restore-keys: ${{ runner.os }}-poetry-typecheck-
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python -
~/.local/bin/poetry config virtualenvs.create false
echo "~/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: poetry install --extras sentry
- name: Typecheck the project
run: mypy gimvicurnik