[Debt] Removes teams from UI #6982
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: Playwright | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "**.md" | |
pull_request: | |
paths: | |
- .github/workflows/*playwright*.yml | |
- apps/** | |
- packages/** | |
- api/** | |
merge_group: | |
branches: [main] | |
# Concurrency is used to cancel other currently-running jobs, to preserve | |
# compute resources and cumulative build hours. (ie. If you push twice in a | |
# row, this will cancel the previous run.) | |
# See: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow | |
concurrency: | |
# This scopes the group to: | |
# - the same workflow, | |
# - the same event type, and | |
# - the same branch name | |
# e.g., my-workflow-pull_request-feature/123-my-thing | |
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref_name }} | |
cancel-in-progress: true | |
jobs: | |
playwright: | |
name: Playwright | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
shardIndex: [1, 2, 3, 4] | |
shardTotal: [4] | |
env: | |
# Use native docker command within docker compose | |
COMPOSE_DOCKER_CLI_BUILD: 1 | |
# Use buildkit to speed up docker command | |
DOCKER_BUILDKIT: 1 | |
PNPM_VERSION: "9.12.3" | |
steps: | |
# See: https://github.com/satackey/action-docker-layer-caching/issues/139#issuecomment-1007316528 | |
- name: reclaim space on runner | |
run: rm -rf /usr/local/android /usr/share/dotnet /usr/local/share/boost /opt/ghc | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# We no longer user docker layer caching as it made runs take longer. | |
# See: https://github.com/satackey/action-docker-layer-caching/issues/305 | |
- name: Serve app via docker compose | |
# Need to include --build as we're caching layers. | |
run: docker compose up --detach --build | |
- name: "Run: setup.sh" | |
run: docker compose run --rm maintenance bash setup.sh -c | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: ${{ env.PNPM_VERSION }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".nvmrc" | |
cache: pnpm | |
# Fix some issue with cache in setup-node | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Install Playwright Browsers | |
run: npx playwright install chromium webkit --with-deps | |
- name: Run Tests | |
run: pnpm run e2e:playwright --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: blob-report-${{ matrix.shardIndex }} | |
path: ./apps/playwright/blob-report | |
retention-days: 1 | |
merge-reports: | |
# Merge reports after playwright-tests, even if some shards have failed | |
if: ${{ !cancelled() }} | |
needs: [playwright] | |
runs-on: ubuntu-latest | |
env: | |
PNPM_VERSION: "9.12.3" | |
steps: | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: ${{ env.PNPM_VERSION }} | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".nvmrc" | |
cache: pnpm | |
# Fix some issue with cache in setup-node | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Download blob reports from GitHub Actions Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: all-blob-reports | |
pattern: blob-report-* | |
merge-multiple: true | |
- name: Merge into HTML Report | |
run: npx playwright merge-reports --reporter html ./all-blob-reports | |
- name: Upload HTML report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: html-report--attempt-${{ github.run_attempt }} | |
path: playwright-report | |
retention-days: 14 |