mirror of
https://github.com/johndoe6345789/low-code-react-app-b.git
synced 2026-04-25 14:14:57 +00:00
(Line: 236, Col: 13): Unrecognized named-value: 'secrets'. Located at position 13 within expression: always() && secrets.SLACK_WEBHOOK != '', (Line: 261, Col: 13): Unrecognized named-value: 'secrets'. Located at position 13 within expression: always() && secrets.SLACK_WEBHOOK != '' also e2e-tests.yml needs work as per previous commit.
63 lines
1.6 KiB
YAML
63 lines
1.6 KiB
YAML
name: E2E Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, develop ]
|
|
pull_request:
|
|
branches: [ main, develop ]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test:
|
|
timeout-minutes: 60
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
|
|
- name: Install Playwright Browsers
|
|
run: npx playwright install --with-deps chromium
|
|
|
|
- name: Check if E2E tests exist
|
|
id: check-tests
|
|
run: |
|
|
if [ -d "e2e" ] && [ "$(ls -A e2e/*.spec.ts 2>/dev/null)" ]; then
|
|
echo "has_tests=true" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "has_tests=false" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
- name: Run Playwright tests
|
|
if: steps.check-tests.outputs.has_tests == 'true'
|
|
run: npx playwright test
|
|
timeout-minutes: 30
|
|
|
|
- name: Skip E2E tests
|
|
if: steps.check-tests.outputs.has_tests == 'false'
|
|
run: echo "No E2E tests configured - skipping"
|
|
|
|
- name: Upload Playwright Report
|
|
uses: actions/upload-artifact@v4
|
|
if: always() && steps.check-tests.outputs.has_tests == 'true'
|
|
with:
|
|
name: playwright-report
|
|
path: playwright-report/
|
|
retention-days: 30
|
|
|
|
- name: Upload Test Results
|
|
uses: actions/upload-artifact@v4
|
|
if: always() && steps.check-tests.outputs.has_tests == 'true'
|
|
with:
|
|
name: test-results
|
|
path: test-results/
|
|
retention-days: 30
|