|
|
|
@ -56,15 +56,15 @@ jobs:
|
|
|
|
|
- name: setup mysql |
|
|
|
|
if: ${{ inputs.db == 'mysql' }} |
|
|
|
|
working-directory: ./ |
|
|
|
|
run: docker-compose -f ./packages/nc-gui/tests/playwright/scripts/docker-compose-mysql-playwright.yml up -d & |
|
|
|
|
run: docker-compose -f ./tests/playwright/scripts/docker-compose-mysql-playwright.yml up -d & |
|
|
|
|
- name: setup pg |
|
|
|
|
if: ${{ inputs.db == 'pg' }} |
|
|
|
|
working-directory: ./ |
|
|
|
|
run: docker-compose -f ./packages/nc-gui/tests/playwright/scripts/docker-compose-playwright-pg.yml up -d & |
|
|
|
|
run: docker-compose -f ./tests/playwright/scripts/docker-compose-playwright-pg.yml up -d & |
|
|
|
|
- name: setup pg for quick tests |
|
|
|
|
if: ${{ inputs.db == 'sqlite' && inputs.shard == '1' }} |
|
|
|
|
working-directory: ./ |
|
|
|
|
run: docker-compose -f ./packages/nc-gui/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 |
|
|
|
@ -78,14 +78,14 @@ jobs:
|
|
|
|
|
id: playwright-cache |
|
|
|
|
with: |
|
|
|
|
path: | |
|
|
|
|
**/packages/nc-gui/tests/playwright/node_modules |
|
|
|
|
key: cache-nc-playwright-${{ hashFiles('**/packages/nc-gui/tests/playwright/package-lock.json') }} |
|
|
|
|
**/tests/playwright/node_modules |
|
|
|
|
key: cache-nc-playwright-${{ hashFiles('**/tests/playwright/package-lock.json') }} |
|
|
|
|
- name: Install dependencies |
|
|
|
|
if: steps.playwright-cache.outputs.cache-hit != 'true' |
|
|
|
|
working-directory: ./packages/nc-gui/tests/playwright |
|
|
|
|
working-directory: ./tests/playwright |
|
|
|
|
run: npm install |
|
|
|
|
- name: Install Playwright Browsers |
|
|
|
|
working-directory: ./packages/nc-gui/tests/playwright |
|
|
|
|
working-directory: ./tests/playwright |
|
|
|
|
run: npx playwright install chromium --with-deps |
|
|
|
|
- name: Wait for backend |
|
|
|
|
run: | |
|
|
|
@ -95,7 +95,7 @@ jobs:
|
|
|
|
|
done |
|
|
|
|
|
|
|
|
|
- name: Run Playwright tests |
|
|
|
|
working-directory: ./packages/nc-gui/tests/playwright |
|
|
|
|
working-directory: ./tests/playwright |
|
|
|
|
run: E2E_DB_TYPE=${{ inputs.db }} npm run ci:test:shard:${{ inputs.shard }} |
|
|
|
|
|
|
|
|
|
# Quick tests (pg on sqlite shard 0 and sqlite on sqlite shard 1) |
|
|
|
@ -113,7 +113,7 @@ jobs:
|
|
|
|
|
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: ./packages/nc-gui/tests/playwright |
|
|
|
|
working-directory: ./tests/playwright |
|
|
|
|
run: | |
|
|
|
|
while ! curl --output /dev/null --silent --head --fail http://localhost:8080; do |
|
|
|
|
printf '.' |
|
|
|
@ -130,14 +130,14 @@ jobs:
|
|
|
|
|
if: ${{ inputs.db == 'sqlite' }} |
|
|
|
|
with: |
|
|
|
|
name: playwright-report-quick-${{ inputs.shard }} |
|
|
|
|
path: ./packages/nc-gui/tests/playwright/playwright-report-quick/ |
|
|
|
|
path: ./tests/playwright/playwright-report-quick/ |
|
|
|
|
retention-days: 2 |
|
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v3 |
|
|
|
|
if: always() |
|
|
|
|
with: |
|
|
|
|
name: playwright-report-${{ inputs.db }}-${{ inputs.shard }} |
|
|
|
|
path: ./packages/nc-gui/tests/playwright/playwright-report/ |
|
|
|
|
path: ./tests/playwright/playwright-report/ |
|
|
|
|
retention-days: 2 |
|
|
|
|
- uses: actions/upload-artifact@v3 |
|
|
|
|
if: always() |
|
|
|
|