Skip to content

[Feature] Implement automatic time data import from PDF and Excel files #79

[Feature] Implement automatic time data import from PDF and Excel files

[Feature] Implement automatic time data import from PDF and Excel files #79

Workflow file for this run

name: Test TimeTrack
on:
push:
branches: [ main, development ]
pull_request:
branches: [ main, development ]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: timetrack_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install pytest pytest-cov black isort mypy colorama
- name: Check code formatting with Black
run: |
black --check --exclude=".venv|migrations|instance" .
- name: Check imports with isort
run: |
isort --check --profile black --skip-glob=".venv/*" --skip-glob="migrations/*" --skip-glob="instance/*" .
- name: Type checking with mypy
run: |
mypy app
- name: Run tests with coverage
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/timetrack_test
FLASK_APP: app:create_app('app.config.config.Config')
SECRET_KEY: test-key
run: |
pytest tests/ --cov=app --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: PPeitsch/TimeTrack