38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
---
|
|
name: Tests
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
test_and_lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.14"
|
|
- name: Install uv
|
|
run: pip install uv
|
|
- name: Install dependencies
|
|
run: uv sync --frozen
|
|
- name: copy env
|
|
run: cp .env.template .env
|
|
- name: Install exiftool (system dependency)
|
|
run: |
|
|
if command -v exiftool >/dev/null 2>&1; then
|
|
echo "exiftool already installed"
|
|
elif command -v sudo >/dev/null 2>&1; then
|
|
sudo apt-get update && sudo apt-get install -y --no-install-recommends libimage-exiftool-perl
|
|
else
|
|
apt-get update && apt-get install -y --no-install-recommends libimage-exiftool-perl
|
|
fi
|
|
- name: Run pytest
|
|
run: uv run pytest .
|
|
- name: Lint (ruff)
|
|
run: uv run ruff check .
|
|
- name: Typing (mypy)
|
|
run: uv run mypy .
|
|
- name: Check formatting (black)
|
|
run: uv run black --check . --extend-exclude .venv
|