Skip to content

Merge pull request #13 from m-danya/simplify-calendar-view #90

Merge pull request #13 from m-danya/simplify-calendar-view

Merge pull request #13 from m-danya/simplify-calendar-view #90

Workflow file for this run

on:
push:
name: pytest, ruff, mypy
jobs:
test:
runs-on: ubuntu-latest
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v4
- name: Set up python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: "3.11"
#----------------------------------------------
# ----- Set up .env -----
#----------------------------------------------
- name: Set up .env
run: |
cp .env.sample .env
echo "PLANTY_AUTH_SECRET=TEST_SECRET" >> .env
#----------------------------------------------
# ----- install uv -----
#----------------------------------------------
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.5.13"
#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-uv-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/uv.lock') }}
#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install dependencies
if: steps.cached-uv-dependencies.outputs.cache-hit != 'true'
run: uv sync --all-extras --dev
#----------------------------------------------
# run test suite
#----------------------------------------------
- name: Run ruff
run: |
source .venv/bin/activate
ruff format --check
ruff check
- name: Run pytest
run: |
source .venv/bin/activate
pytest --cov
- name: Run mypy
run: |
source .venv/bin/activate
mypy planty