Update dependency @storybook/test-runner to v0.20.0 #1716
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Strapi - Playwright Tests | |
on: [push, merge_group] | |
# https://stackoverflow.com/a/72408109/2714285 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./strapi | |
steps: | |
- uses: actions/checkout@v3 | |
# https://github.com/renovatebot/renovate/issues/7716#issuecomment-734391360 | |
- name: Read Node.js version from .nvmrc | |
run: echo "NODE_VERSION=$(cat ../.nvmrc)" >> $GITHUB_OUTPUT | |
id: nvm | |
# https://github.com/actions/setup-node#caching-global-packages-data | |
- uses: actions/setup-node@v3 | |
with: | |
# https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#multiple-operating-systems-and-architectures | |
node-version: ${{ steps.nvm.outputs.NODE_VERSION }} | |
cache: 'yarn' | |
cache-dependency-path: quasar/yarn.lock | |
- name: Install dependencies | |
run: yarn install --immutable | |
# - name: Install Playwright Browsers | |
# run: npx playwright install --with-deps | |
- name: Set the fake .env file | |
run: mv .env.test .env | |
- name: Populate sqlite db with fixtures | |
run: ./tests/import_sqlite_fixtures.sh | |
- name: build Strapi | |
run: yarn build | |
- name: start Strapi | |
run: yarn develop & | |
- uses: Unsupervisedcom/action-wait-for-ports@v1 | |
with: | |
# Comma separated list of ports to wait for | |
ports: "1337" | |
# Max time in milliseconds to wait | |
# Default: 30000 | |
max-wait: "60000" | |
# How frequently to check ports, in milliseconds | |
# Default: 5000 | |
check-interval: "3" | |
- name: Run Playwright tests | |
run: yarn playwright test | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: playwright-report | |
path: ./strapi/playwright-report/ | |
retention-days: 30 |