Browse Source

fix(nocodb): GH action debuging logic reverted

pull/4820/head
Muhammed Mustafa 2 years ago
parent
commit
c03098a33a
  1. 49
      .github/workflows/playwright-test-workflow.yml

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

@ -65,35 +65,14 @@ jobs:
if: ${{ inputs.db == 'sqlite' && inputs.shard == '1' }} if: ${{ inputs.db == 'sqlite' && inputs.shard == '1' }}
working-directory: ./ working-directory: ./
run: docker-compose -f ./tests/playwright/scripts/docker-compose-pg-pw-quick.yml up -d & run: docker-compose -f ./tests/playwright/scripts/docker-compose-pg-pw-quick.yml up -d &
- name: run frontend
working-directory: ./packages/nc-gui
run: npm run ci:run
- name: Run backend - name: Run backend
working-directory: ./packages/nocodb working-directory: ./packages/nocodb
run: | run: |
npm install npm install
npm run watch:run:playwright > ${{ inputs.db }}_${{ inputs.shard }}_test_backend.log & npm run watch:run:playwright > ${{ inputs.db }}_${{ inputs.shard }}_test_backend.log &
- name: Wait for backend
run: |
while ! curl --output /dev/null --silent --head --fail http://localhost:8080; do
printf '.'
sleep 2
done
- name: Run quick server and tests (sqlite)
if: ${{ inputs.db == 'sqlite' && inputs.shard == '2' }}
working-directory: ./packages/nocodb
run: |
kill -9 $(lsof -t -i:8080)
npm run watch:run:playwright:quick > quick_${{ inputs.shard }}_test_backend.log
- name: Wait for backend & run quick tests
if: ${{ inputs.db == 'sqlite' }}
working-directory: ./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
- name: run frontend
working-directory: ./packages/nc-gui
run: npm run ci:run
- name: Cache playwright npm modules - name: Cache playwright npm modules
uses: actions/cache@v3 uses: actions/cache@v3
id: playwright-cache id: playwright-cache
@ -108,7 +87,12 @@ jobs:
- name: Install Playwright Browsers - name: Install Playwright Browsers
working-directory: ./tests/playwright working-directory: ./tests/playwright
run: npx playwright install chromium --with-deps run: npx playwright install chromium --with-deps
- name: Wait for backend
run: |
while ! curl --output /dev/null --silent --head --fail http://localhost:8080; do
printf '.'
sleep 2
done
- name: Run Playwright tests - name: Run Playwright tests
working-directory: ./tests/playwright working-directory: ./tests/playwright
run: E2E_DB_TYPE=${{ inputs.db }} npm run ci:test:shard:${{ inputs.shard }} run: E2E_DB_TYPE=${{ inputs.db }} npm run ci:test:shard:${{ inputs.shard }}
@ -128,6 +112,21 @@ 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 &
- name: Run quick server and tests (sqlite)
if: ${{ inputs.db == 'sqlite' && inputs.shard == '2' }}
working-directory: ./packages/nocodb
run: |
kill -9 $(lsof -t -i:8080)
npm run watch:run:playwright:quick > quick_${{ inputs.shard }}_test_backend.log &
- name: Wait for backend & run quick tests
if: ${{ inputs.db == 'sqlite' }}
working-directory: ./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 - uses: actions/upload-artifact@v3
if: ${{ inputs.db == 'sqlite' }} if: ${{ inputs.db == 'sqlite' }}
with: with:

Loading…
Cancel
Save