Browse Source

fix(test): Maximum timeout for each instance is 30 minutes and imrpoved quick test CI configuration

pull/4360/head
Muhammed Mustafa 2 years ago
parent
commit
1e1baaf642
  1. 22
      .github/workflows/playwright-test-workflow.yml

22
.github/workflows/playwright-test-workflow.yml

@ -14,6 +14,7 @@ on:
jobs: jobs:
playwright: playwright:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
timeout-minutes: 20
steps: steps:
# Reference: https://github.com/pierotofy/set-swap-space/blob/master/action.yml # Reference: https://github.com/pierotofy/set-swap-space/blob/master/action.yml
- name: Set 5gb swap - name: Set 5gb swap
@ -102,17 +103,28 @@ jobs:
run: | run: |
kill -9 $(lsof -t -i:8080) kill -9 $(lsof -t -i:8080)
npm run watch:run:playwright:pg:cyquick & npm run watch:run:playwright:pg:cyquick &
cd ../nc-gui/tests/playwright
npm run test:quick
- name: Run quick server and tests (sqlite) - name: Run quick server and tests (sqlite)
if: ${{ inputs.db == 'sqlite' && inputs.shard == '2' }} if: ${{ inputs.db == 'sqlite' && inputs.shard == '2' }}
working-directory: ./packages/nocodb working-directory: ./packages/nocodb
run: | run: |
kill -9 $(lsof -t -i:8080) kill -9 $(lsof -t -i:8080)
npm run watch:run:playwright:quick & npm run watch:run:playwright:quick &
cd ../nc-gui/tests/playwright - name: Wait for backend & run quick tests
npm run test:quick if: ${{ inputs.db == 'sqlite' }}
working-directory: ./packages/nc-gui/tests/playwright
run: |
while ! curl --output /dev/null --silent --head --fail http://localhost:8080; do
printf '.'
sleep 2
done
PLAYWRIGHT_HTML_REPORT=playwright-report-quick npm run test:quick
- uses: actions/upload-artifact@v3
if: ${{ inputs.db == 'sqlite' }}
with:
name: playwright-report-quick-${{ inputs.shard }}
path: ./packages/nc-gui/tests/playwright/playwright-report-quick/
retention-days: 2
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
if: always() if: always()
with: with:

Loading…
Cancel
Save