This commit is contained in:
resonic-user 2025-06-17 22:39:33 +00:00
parent 2348c356b1
commit 3a2a2a1732

View File

@ -158,80 +158,80 @@ jobs:
[ -x /opt/cucumber-json-formatter ] || (echo "❌ Formatter fehlt" && exit 1)
/opt/cucumber-json-formatter --help || (echo "❌ Formatter nicht ausführbar" && exit 1)
consolidate-environment:
name: Fullstack | tests
if: success()
needs: [build-images, cache-environment]
runs-on: ubuntu-latest
env:
jobs: 8
strategy:
matrix:
job: [1, 2, 3, 4, 5, 6, 7, 8]
consolidate-environment:
name: Fullstack | tests
if: success()
needs: [build-images, cache-environment]
runs-on: ubuntu-latest
env:
jobs: 8
strategy:
matrix:
job: [1, 2, 3, 4, 5, 6, 7, 8]
steps:
- name: Checkout repository
uses: actions/checkout@v4
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Restore CI cache
uses: actions/cache/restore@v4
with:
key: ${{ needs.cache-environment.outputs.cache-key }}
path: |
node_modules
backend/node_modules
webapp/node_modules
backend/build
webapp/.nuxt
~/.cache/Cypress
/opt/cucumber-json-formatter
- name: Restore CI cache
uses: actions/cache/restore@v4
with:
key: ${{ needs.cache-environment.outputs.cache-key }}
path: |
node_modules
backend/node_modules
webapp/node_modules
backend/build
webapp/.nuxt
~/.cache/Cypress
/opt/cucumber-json-formatter
- name: Setup .env files & reports dir
run: |
cp backend/.env.test_e2e backend/.env
cp webapp/.env.template webapp/.env
mkdir -p cypress/reports/json_logs
- name: Setup .env files & reports dir
run: |
cp backend/.env.test_e2e backend/.env
cp webapp/.env.template webapp/.env
mkdir -p cypress/reports/json_logs
- name: Load Docker images
run: |
docker load < /tmp/backend-image/backend.tar
docker load < /tmp/webapp-image/webapp.tar
docker load < /tmp/neo4j-image/neo4j.tar
- name: Load Docker images
run: |
docker load < /tmp/backend-image/backend.tar
docker load < /tmp/webapp-image/webapp.tar
docker load < /tmp/neo4j-image/neo4j.tar
- name: Boot system for tests
run: |
docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach backend mailserver webapp
- name: Boot system for tests
run: |
docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach backend mailserver webapp
- name: Wait for services
run: |
for i in {1..30}; do
curl -sf http://localhost:3000 && echo "✅ Webapp ready" && break
echo "Waiting... ($i/30)"
sleep 2
done
- name: Wait for services
run: |
for i in {1..30}; do
curl -sf http://localhost:3000 && echo "✅ Webapp ready" && break
echo "Waiting... ($i/30)"
sleep 2
done
- name: Run Cypress tests
id: e2e-tests
run: |
npx cypress run \
--config-file ./cypress/cypress.config.js \
--spec $(cypress/parallel-features.sh ${{ matrix.job }} ${{ env.jobs }})
- name: Run Cypress tests
id: e2e-tests
run: |
npx cypress run \
--config-file ./cypress/cypress.config.js \
--spec $(cypress/parallel-features.sh ${{ matrix.job }} ${{ env.jobs }})
- name: Create HTML report (if failed)
if: ${{ failure() && steps.e2e-tests.conclusion == 'failure' }}
run: |
node cypress/create-cucumber-html-report.js
- name: Create HTML report (if failed)
if: ${{ failure() && steps.e2e-tests.conclusion == 'failure' }}
run: |
node cypress/create-cucumber-html-report.js
- name: Upload HTML report (if failed)
if: ${{ failure() && steps.e2e-tests.conclusion == 'failure' }}
uses: actions/upload-artifact@v4
with:
name: e2e-html-report-${{ matrix.job }}
path: cypress/reports/cucumber_html_report
- name: Upload HTML report (if failed)
if: ${{ failure() && steps.e2e-tests.conclusion == 'failure' }}
uses: actions/upload-artifact@v4
with:
name: e2e-html-report-${{ matrix.job }}
path: cypress/reports/cucumber_html_report
- name: Debug output (always)
if: always()
run: |
echo "📁 Cypress reports"
ls -l cypress/reports/json_logs || echo "❌ Missing JSON logs"
- name: Debug output (always)
if: always()
run: |
echo "📁 Cypress reports"
ls -l cypress/reports/json_logs || echo "❌ Missing JSON logs"