feat(workflows): Update CI configuration and enhance testing conditions
Deploy Development / deploy (push) Successful in 48s
Build Test / pytest-backend-csv (push) Failing after 24s
Build Test / lint-backend (push) Failing after 3s
Build Test / build-frontend (push) Successful in 1m25s

- Added workflow_run triggers for "Deploy Development" and "Deploy Production" to ensure tests run only after successful deployments.
- Updated Python version in CI from 3.12 to 3.11 for better compatibility with the Debian 12 ARM64 runner.
- Enhanced job conditions to skip tests on failed workflow runs.
- Improved frontend build process by updating Node.js setup and ensuring correct directory navigation.
- Refined CSV parsing logic to handle custom and unknown source units, enhancing conversion flexibility.
- Added new tests for custom source unit handling in CSV conversions, ensuring accurate processing.
This commit is contained in:
Lars committed 2026-04-10 10:27:59 +02:00
1 parent d6d7e738a5
commit 0d0ab62674
5 files changed
+53 -9

No files matched your search

+23 -3
View File
@@ -3,9 +3,13 @@ name: Build Test
on:
push:
branches: [main, develop]
workflow_run:
workflows: ["Deploy Development", "Deploy Production"]
types: [completed]
jobs:
pytest-backend-csv:
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -13,7 +17,9 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
# Debian 12 ARM64 runner hat fuer 3.12 oft kein setup-python Build.
# 3.11 ist dort breit verfuegbar und fuer unsere Tests ausreichend.
python-version: "3.11"
- name: Install dependencies
run: |
pip install -r backend/requirements.txt -r backend/requirements-dev.txt
@@ -23,19 +29,33 @@ jobs:
python -m pytest tests/test_csv_parser_core.py tests/test_csv_import_executor.py tests/test_mapping_suggest.py -q --tb=short
lint-backend:
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Check backend syntax
run: |
python3 -m py_compile /home/lars/docker/bodytrack/backend/main.py
python -m py_compile backend/main.py
echo "✓ Backend syntax OK"
build-frontend:
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Build frontend
run: |
cd /home/lars/docker/bodytrack/frontend
cd frontend
npm install
npm run build
echo "✓ Frontend build OK"