chore: version packages #2838
Workflow file for this run
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: Verify changes | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- 'release/**' | |
jobs: | |
branch-info: | |
name: Branch Info | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get base branch | |
id: get-base-branch | |
run: | | |
if [[ "${{github.event.pull_request.base.ref}}" != "" ]]; then | |
echo "BRANCH=${{github.event.pull_request.base.ref}}" >> $GITHUB_OUTPUT | |
else | |
echo "BRANCH=main" >> $GITHUB_OUTPUT | |
fi | |
outputs: | |
base-branch: ${{ steps.get-base-branch.outputs.BRANCH }} | |
lint: | |
name: Lint | |
needs: [branch-info] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: pnpm/action-setup@v2 | |
- name: Derive appropriate SHAs for base and head for `nx affected` commands | |
uses: nrwl/nx-set-shas@v3 | |
with: | |
main-branch-name: ${{needs.branch-info.outputs.base-branch}} | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: pnpm | |
- name: Install Dependencies | |
run: pnpm install | |
- name: Lint | |
run: pnpm lint:ci | |
test: | |
name: Test | |
needs: [branch-info] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: pnpm/action-setup@v2 | |
- name: Derive appropriate SHAs for base and head for `nx affected` commands | |
uses: nrwl/nx-set-shas@v3 | |
with: | |
main-branch-name: ${{needs.branch-info.outputs.base-branch}} | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: pnpm | |
- name: Install Dependencies | |
run: pnpm install | |
- name: Test | |
run: pnpm test:packages | |
e2e: | |
name: e2e | |
needs: [branch-info] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: pnpm/action-setup@v2 | |
- name: Derive appropriate SHAs for base and head for `nx affected` commands | |
uses: nrwl/nx-set-shas@v3 | |
with: | |
main-branch-name: ${{needs.branch-info.outputs.base-branch}} | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: pnpm | |
- name: Install Dependencies | |
run: pnpm install | |
- name: Get Playwright Version | |
id: get-version | |
run: | | |
echo "VERSION=$(pnpm playwright --version)" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Cache Browsers | |
id: cache-browsers | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/ms-playwright | |
key: ${{ runner.os }}-playwright-${{ steps.get-version.outputs.VERSION }} | |
restore-keys: | | |
${{ runner.os }}-playwright- | |
- name: Install Playwright | |
if: steps.cache-browsers.outputs.cache-hit != 'true' | |
run: pnpm playwright install | |
- name: SSR | |
run: pnpm e2e:ssr | |
- name: Upload blob report to GitHub Actions Artifacts | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: all-blob-reports | |
path: blob-report | |
retention-days: 1 | |
merge-reports: | |
# Merge reports after playwright-tests, even if some shards have failed | |
if: always() | |
needs: [e2e] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: pnpm/action-setup@v2 | |
- name: Derive appropriate SHAs for base and head for `nx affected` commands | |
uses: nrwl/nx-set-shas@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: pnpm | |
- name: Install Dependencies | |
run: pnpm install | |
- name: Download blob reports from GitHub Actions Artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: all-blob-reports | |
path: all-blob-reports | |
- name: Merge into HTML Report | |
run: pnpm playwright merge-reports --reporter html ./all-blob-reports | |
- name: Upload HTML report | |
uses: actions/upload-artifact@v3 | |
with: | |
name: html-report--attempt-${{ github.run_attempt }} | |
path: playwright-report | |
retention-days: 14 |