feat(workflows): Update CI configuration and enhance testing conditions
- 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:
1 parent
d6d7e738a5
commit
0d0ab62674
5 files changed
+53
-9
No files matched your search
@@ -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"
|
||||
Reference in new issue
Block a user