Repository navigation
Manual Penpot Tests for PR #1289
Workflow file for this run
This file contains hidden or 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: Manual Penpot Tests for PR | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| test_mode: | |
| description: 'Test execution mode' | |
| required: true | |
| type: choice | |
| options: | |
| - 'all_tests' | |
| - 'changed_only' | |
| - 'by_folder' | |
| - 'by_spec' | |
| default: 'changed_only' | |
| test_folder: | |
| description: 'Test folder (only if you select "by_folder")' | |
| required: false | |
| type: choice | |
| options: | |
| - tests/action-menu | |
| - tests/assets | |
| - tests/assets/shared-libraries | |
| - tests/color | |
| - tests/components | |
| - tests/components/copy-components | |
| - tests/components/main-components | |
| - tests/components/variants | |
| - tests/composition | |
| - tests/composition/text | |
| - tests/composition/image | |
| - tests/composition/comments | |
| - tests/dashboard | |
| - tests/dashboard/teams | |
| - tests/dashboard/teams/settings | |
| - tests/dashboard/trash | |
| - tests/enterprise | |
| - tests/enterprise/admin-console | |
| - tests/enterprise/billing-ui-flow | |
| - tests/enterprise/dashboard-enterprise | |
| - tests/enterprise/destructive | |
| - tests/login-signup | |
| - tests/panels-features | |
| - tests/panels-features/main-menu | |
| - tests/panels-features/history | |
| - tests/panels-features/stroke | |
| - tests/panels-features/text | |
| - tests/plugins | |
| - tests/your-account | |
| - tests/your-account/integrations | |
| - tests/subscription-plans | |
| - tests/tokens | |
| - tests/tokens/token-types | |
| - tests/tokens/token-group | |
| - tests/ui-theme | |
| - tests/view-mode | |
| default: 'tests/login-signup' | |
| test_spec: | |
| description: 'Test spec path (only if you select "by_spec", e.g., tests/login-signup/login.spec.ts)' | |
| required: false | |
| type: string | |
| repeat_each: | |
| description: 'Run each test N times (default: 1).' | |
| required: true | |
| type: string | |
| default: '1' | |
| test_grep: | |
| description: 'Grep pattern to filter tests by title (optional, only used with "by_folder" or "by_spec"), e.g. "1718|1728"' | |
| required: false | |
| type: string | |
| permissions: | |
| contents: write | |
| jobs: | |
| tests_chromium: | |
| defaults: | |
| run: | |
| shell: bash | |
| environment: PRE | |
| timeout-minutes: 280 | |
| runs-on: ubuntu-24.04 | |
| env: | |
| TZ: Europe/Madrid | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Playwright Environment | |
| uses: ./.github/actions/setup-playwright | |
| - name: Run Playwright tests | |
| id: run-tests | |
| env: | |
| BASE_URL: ${{ secrets.BASE_URL }} | |
| LICENSES_MANAGER_URL: ${{ secrets.LICENSES_MANAGER_URL }} | |
| LOGIN_EMAIL: ${{ secrets.LOGIN_EMAIL }} | |
| SECOND_EMAIL: ${{ secrets.SECOND_EMAIL }} | |
| LOGIN_PWD: ${{ secrets.LOGIN_PWD }} | |
| SSO_LOGIN_EMAIL: ${{ secrets.SSO_LOGIN_EMAIL }} | |
| SSO_LOGIN_PWD: ${{ secrets.SSO_LOGIN_PWD }} | |
| GITHUB_RUN_ID: ${{ github.run_id }} | |
| REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }} | |
| CLIENT_ID: ${{ secrets.CLIENT_ID }} | |
| CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} | |
| GMAIL_NAME: ${{ secrets.GMAIL_NAME }} | |
| GMAIL_DOMAIN: ${{ secrets.GMAIL_DOMAIN }} | |
| STRIPE_SK: ${{ secrets.STRIPE_SK }} | |
| ENTERPRISE_SSO_ISSUER_URL: ${{ secrets.ENTERPRISE_SSO_ISSUER_URL }} | |
| ENTERPRISE_SSO_CLIENT_ID: ${{ secrets.ENTERPRISE_SSO_CLIENT_ID }} | |
| ENTERPRISE_SSO_CLIENT_SECRET: ${{ secrets.ENTERPRISE_SSO_CLIENT_SECRET }} | |
| TEST_MODE: ${{ github.event.inputs.test_mode }} | |
| TEST_FOLDER: ${{ github.event.inputs.test_folder }} | |
| TEST_SPEC: ${{ github.event.inputs.test_spec }} | |
| REPEAT_EACH: ${{ github.event.inputs.repeat_each }} | |
| TEST_GREP: ${{ github.event.inputs.test_grep }} | |
| run: | | |
| case "$TEST_MODE" in | |
| "all_tests") | |
| echo "π Running all tests..." | |
| npx playwright test --project=chrome | |
| ;; | |
| "changed_only") | |
| echo "π Running tests for changed files only..." | |
| npx playwright test --project=chrome --only-changed=origin/main | |
| ;; | |
| "by_folder") | |
| echo "π Running tests from folder: $TEST_FOLDER" | |
| if [ -z "$TEST_FOLDER" ]; then | |
| echo "β Error: No test folder specified" | |
| exit 1 | |
| fi | |
| if [ ! -d "$TEST_FOLDER" ]; then | |
| echo "β Error: Folder '$TEST_FOLDER' does not exist" | |
| exit 1 | |
| fi | |
| # tests/enterprise/ (and its subfolders) live in their own | |
| # Playwright project (see tests/enterprise/README.md) β the | |
| # `chrome` project explicitly ignores them, so route to | |
| # `--project=enterprise` instead. | |
| case "$TEST_FOLDER" in | |
| tests/enterprise*) | |
| PROJECT=enterprise | |
| ;; | |
| *) | |
| PROJECT=chrome | |
| ;; | |
| esac | |
| ARGS=(--project="$PROJECT" --repeat-each="$REPEAT_EACH" "$TEST_FOLDER") | |
| if [ -n "$TEST_GREP" ]; then | |
| ARGS+=(-g "$TEST_GREP") | |
| fi | |
| npx playwright test "${ARGS[@]}" | |
| ;; | |
| "by_spec") | |
| echo "π Running test spec: $TEST_SPEC" | |
| case "$TEST_SPEC" in | |
| tests/enterprise/*) | |
| PROJECT=enterprise | |
| ;; | |
| *) | |
| PROJECT=chrome | |
| ;; | |
| esac | |
| ARGS=(--project="$PROJECT" --repeat-each="$REPEAT_EACH" "$TEST_SPEC") | |
| if [ -n "$TEST_GREP" ]; then | |
| ARGS+=(-g "$TEST_GREP") | |
| fi | |
| npx playwright test "${ARGS[@]}" | |
| ;; | |
| *) | |
| echo "β Error: Invalid test mode" | |
| exit 1 | |
| ;; | |
| esac | |
| - name: Generate and Upload Reports | |
| uses: ./.github/actions/upload-reports | |
| with: | |
| artifact-name: 'playwright-report-chromium-pr-${{ github.event.inputs.test_mode }}' | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: ${{ secrets.AWS_REGION }} | |
| browser-name: 'Chrome' | |
| is-manual-execution: 'true' | |
| if: always() | |
| - name: Send Mattermost Notification | |
| uses: ./.github/actions/send-notification | |
| with: | |
| mattermost-webhook-url: ${{ secrets.MATTERMOST_WEBHOOK_PR }} | |
| browser-name: 'Chrome' | |
| folder-path: ${{ github.event.inputs.test_mode == 'by_folder' && github.event.inputs.test_folder || github.event.inputs.test_mode == 'by_spec' && github.event.inputs.test_spec || '' }} | |
| repeat-each: ${{ (github.event.inputs.test_mode == 'by_folder' || github.event.inputs.test_mode == 'by_spec') && github.event.inputs.repeat_each || '' }} | |
| is-manual-execution: 'true' | |
| username: ${{ github.actor }} | |
| if: always() |