|
| 1 | +name: Playwright Cells Critical Flow Tests |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + environment: |
| 7 | + description: 'Select the environment' |
| 8 | + required: true |
| 9 | + type: choice |
| 10 | + options: |
| 11 | + - imai |
| 12 | + - fulu |
| 13 | + - staging |
| 14 | + default: staging |
| 15 | + |
| 16 | + schedule: |
| 17 | + # runs on all three of the environments (in the morning, 9:00 Berlin summer time) |
| 18 | + - cron: '0 7 * * *' |
| 19 | + |
| 20 | +jobs: |
| 21 | + smoke-tests: |
| 22 | + name: Run Playwright Cells Critical Flow Tests |
| 23 | + if: github.repository == 'wireapp/wire-webapp' |
| 24 | + runs-on: [self-hosted, Linux, X64, office] |
| 25 | + |
| 26 | + # Strategy is only used for scheduled runs, for manual runs the selected environment is used |
| 27 | + strategy: |
| 28 | + matrix: |
| 29 | + environment: >- |
| 30 | + ${{ github.event_name == 'schedule' |
| 31 | + && fromJson('["imai","fulu","staging"]') |
| 32 | + || fromJson(format('["{0}"]', github.event.inputs.environment)) }} |
| 33 | +
|
| 34 | +
|
| 35 | + steps: |
| 36 | + - name: Checkout repository |
| 37 | + uses: actions/checkout@v4 |
| 38 | + |
| 39 | + - name: Setup Node.js |
| 40 | + uses: actions/setup-node@v4 |
| 41 | + with: |
| 42 | + node-version: 18.16.x |
| 43 | + cache: 'yarn' |
| 44 | + |
| 45 | + - name: Install JS dependencies |
| 46 | + run: yarn --immutable |
| 47 | + |
| 48 | + - name: Install Playwright browsers |
| 49 | + run: yarn playwright install --with-deps && yarn playwright install chrome |
| 50 | + |
| 51 | + - name: Install 1Password |
| 52 | + uses: 1password/install-cli-action@143a85f84a90555d121cde2ff5872e393a47ab9f |
| 53 | + |
| 54 | + - name: Generate env file |
| 55 | + run: op inject -i test/e2e_tests/.env.${{ github.event.inputs.environment }}.tpl -o test/e2e_tests/.env |
| 56 | + env: |
| 57 | + OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} |
| 58 | + |
| 59 | + - name: Run critical flow tests |
| 60 | + run: yarn e2e-test --grep "@crit-flow-cells" |
| 61 | + |
| 62 | + - name: Upload test report |
| 63 | + if: always() |
| 64 | + uses: actions/upload-artifact@v4 |
| 65 | + with: |
| 66 | + name: playwright-report |
| 67 | + path: playwright-report/ |
0 commit comments