build fix #98
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: [ main ] | |
# pull_request: | |
# branches: [ main ] | |
jobs: | |
test: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
if: "contains(github.event.head_commit.message, '(pw)')" # run playwright based on commit message | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- uses: actions/setup-node@v4 | |
with: | |
# node-version: lts/* | |
node-version: 18 | |
- name: 'Create env file' | |
run: | | |
touch .env | |
echo STAGE=PRD >> .env | |
echo BACKEND_URL="https://tabsets-72089.web.app" >> .env | |
echo TABSETS_PWA_URL="https://pwa.tabsets.net" >> .env | |
echo SENTRY_PROJECT_NAME="tabsets" >> .env | |
echo SENTRY_DSN="${{ secrets.SENTRY_DNS }}" >> .env | |
echo HOST="chrome.extension" >> .env | |
echo LOCALE="en" >> .env | |
- name: Install dependencies | |
# run: npm install -g yarn && yarn | |
run: yarn install | |
- run: npm run "build bex (publish)" | |
- name: Install Playwright Browsers | |
run: yarn playwright install --with-deps | |
- name: Run Playwright tests | |
run: DEBUG=pw:api,pw:browser xvfb-run yarn playwright test | |
- uses: actions/upload-artifact@v4 | |
if: ${{ !cancelled() }} | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 |