🔥 commented undesired workflows for now #858
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 Tests | |
# on: | |
# push: | |
# branches: [develop, main] | |
# pull_request: | |
# branches: [develop, main] | |
# Prevent multiple runs of the same workflow on the same ref | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
install: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Cache Playwright browsers | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/ms-playwright | |
key: playwright-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
playwright-${{ runner.os }}- | |
- name: Install Playwright browsers | |
run: yarn playwright install --with-deps | |
- name: Build application | |
run: yarn build:app | |
env: | |
NEXT_PUBLIC_SPACE_STORAGE_URL: ${{ secrets.NEXT_PUBLIC_SPACE_STORAGE_URL }} | |
NEXT_PUBLIC_STUDIO_API_KEY: ${{ secrets.NEXT_PUBLIC_STUDIO_API_KEY }} | |
NEXT_PUBLIC_API_URL: ${{ secrets.NEXT_PUBLIC_API_URL }} | |
NEXT_PUBLIC_PRIVY_ID: ${{ secrets.NEXT_PUBLIC_PRIVY_ID }} | |
SPACES_KEY: ${{ secrets.SPACES_KEY }} | |
SPACES_SECRET: ${{ secrets.SPACES_SECRET }} | |
SPACE_STORAGE_PATH: ${{ secrets.SPACE_STORAGE_PATH }} | |
- name: Save .next directory | |
uses: actions/upload-artifact@v4 | |
with: | |
name: next-artifact | |
include-hidden-files: true | |
if-no-files-found: error | |
path: ${{ github.workspace }}/packages/app/.next | |
chrome-tests: | |
needs: install | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
- name: Install dependencies | |
run: | | |
npm install -g yarn | |
yarn install | |
- name: Install Playwright browsers | |
run: yarn playwright install --with-deps chromium | |
- name: Download the build folders | |
uses: actions/download-artifact@v4 | |
with: | |
name: next-artifact | |
path: packages/app/.next | |
- name: Run Playwright tests on Chrome | |
run: | | |
cd packages/app | |
yarn playwright test --project=chromium | |
env: | |
NEXT_PUBLIC_SPACE_STORAGE_URL: ${{ secrets.NEXT_PUBLIC_SPACE_STORAGE_URL }} | |
NEXT_PUBLIC_STUDIO_API_KEY: ${{ secrets.NEXT_PUBLIC_STUDIO_API_KEY }} | |
NEXT_PUBLIC_API_URL: ${{ secrets.NEXT_PUBLIC_API_URL }} | |
NEXT_PUBLIC_PRIVY_ID: ${{ secrets.NEXT_PUBLIC_PRIVY_ID }} | |
SPACES_KEY: ${{ secrets.SPACES_KEY }} | |
SPACES_SECRET: ${{ secrets.SPACES_SECRET }} | |
SPACE_STORAGE_PATH: ${{ secrets.SPACE_STORAGE_PATH }} | |
PRIVY_EMAIL: ${{ secrets.PRIVY_EMAIL }} | |
PRIVY_OTP: ${{ secrets.PRIVY_OTP }} | |
ORG_NAME: test_org | |
- name: Upload test results | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: playwright-report-chrome | |
path: packages/app/playwright-report | |
retention-days: 30 | |
firefox-tests: | |
needs: install | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
- name: Install dependencies | |
run: | | |
npm install -g yarn | |
yarn install | |
- name: Install Playwright browsers | |
run: yarn playwright install --with-deps | |
- name: Download the build folders | |
uses: actions/download-artifact@v4 | |
with: | |
name: next-artifact | |
path: packages/app/.next | |
- name: Run Playwright tests on Firefox | |
run: | | |
cd packages/app | |
yarn playwright test --project=firefox | |
env: | |
NEXT_PUBLIC_SPACE_STORAGE_URL: ${{ secrets.NEXT_PUBLIC_SPACE_STORAGE_URL }} | |
NEXT_PUBLIC_STUDIO_API_KEY: ${{ secrets.NEXT_PUBLIC_STUDIO_API_KEY }} | |
NEXT_PUBLIC_API_URL: ${{ secrets.NEXT_PUBLIC_API_URL }} | |
NEXT_PUBLIC_PRIVY_ID: ${{ secrets.NEXT_PUBLIC_PRIVY_ID }} | |
SPACES_KEY: ${{ secrets.SPACES_KEY }} | |
SPACES_SECRET: ${{ secrets.SPACES_SECRET }} | |
SPACE_STORAGE_PATH: ${{ secrets.SPACE_STORAGE_PATH }} | |
PRIVY_EMAIL: ${{ secrets.PRIVY_EMAIL }} | |
PRIVY_OTP: ${{ secrets.PRIVY_OTP }} | |
ORG_NAME: test_org | |
- name: Upload test results | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: playwright-report-firefox | |
path: packages/app/playwright-report | |
retention-days: 30 |