add branch doc #36
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: | |
- test/add-new-test | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "14" | |
- name: Install dependencies | |
run: npm install | |
- name: Install browser dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
libwoff1 \ | |
libopus0 \ | |
libwebp7 \ | |
libenchant-2-2 \ | |
libgudev-1.0-0 \ | |
libsecret-1-0 \ | |
libhyphen0 \ | |
libgstreamer1.0-0 \ | |
libgstreamer-plugins-base1.0-0 \ | |
libgstreamer-plugins-good1.0-0 \ | |
gstreamer1.0-libav \ | |
gstreamer1.0-plugins-bad \ | |
gstreamer1.0-plugins-base \ | |
gstreamer1.0-plugins-good \ | |
gstreamer1.0-pulseaudio \ | |
libgtk-3-0 \ | |
libnotify4 \ | |
libnspr4 \ | |
libnss3 \ | |
libxss1 \ | |
libxtst6 \ | |
libatk-bridge2.0-0 \ | |
libxcomposite1 \ | |
libxdamage1 \ | |
libxrandr2 \ | |
libgbm1 \ | |
libpango1.0-0 \ | |
libpangocairo-1.0-0 \ | |
libatspi2.0-0 \ | |
libjpeg-turbo8 \ | |
libgdk-pixbuf2.0-0 \ | |
libcups2 \ | |
libxshmfence1 \ | |
libopenjp2-7 \ | |
libflac8 \ | |
libharfbuzz-icu0 \ | |
libflite1 \ | |
libgles2-mesa \ | |
libevent-2.1-7 \ | |
libmanette-0.2-0 | |
- name: Install playwright driver | |
run: npx playwright install | |
- name: Run Playwright tests | |
env: | |
FIREBASE_API_KEY: ${{ secrets.FIREBASE_API_KEY }} | |
FIREBASE_AUTHDOMAIN: ${{ secrets.FIREBASE_AUTHDOMAIN }} | |
FIREBASE_PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }} | |
FIREBASE_STORAGE_BUCKET: ${{ secrets.FIREBASE_STORAGE_BUCKET }} | |
FIREBASE_MESSAGE_SENDER_ID: ${{ secrets.FIREBASE_MESSAGE_SENDER_ID }} | |
FIREBASE_APP_ID: ${{ secrets.FIREBASE_APP_ID }} | |
run: npx playwright test | |
- name: Upload screenshots | |
if: always() # Always run this step, even if previous steps fail | |
uses: actions/upload-artifact@v2 | |
with: | |
name: screenshots | |
path: "*.png" |