Bump braces from 3.0.2 to 3.0.3 in /functions #1461
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: Emulated end-to-end testing | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
e2e: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "16" | |
cache: "yarn" | |
- name: Cache node_modules | |
uses: actions/cache@v3 | |
id: cached-node_modules | |
with: | |
path: | | |
node_modules | |
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}-${{ hashFiles('.github/workflows/e2e.yml') }} | |
- name: Install | |
if: steps.cached-node_modules.outputs.cache-hit != 'true' | |
env: | |
# This is because package.json contains `minimalcss` which depends | |
# on `puppeteer`. | |
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1 | |
run: yarn --frozen-lockfile | |
- name: Cache node_modules (functions) | |
uses: actions/cache@v3 | |
id: cached-node_modules-functions | |
with: | |
path: | | |
functions/node_modules | |
key: ${{ runner.os }}-${{ hashFiles('functions/yarn.lock') }}-${{ hashFiles('.github/workflows/e2e.yml') }} | |
- name: Install (functions) | |
if: steps.cached-node_modules-functions.outputs.cache-hit != 'true' | |
working-directory: functions | |
run: yarn --frozen-lockfile | |
- name: Start emulator | |
working-directory: functions | |
run: | | |
yarn serve --project groce-dev > /tmp/emulator-stdout.log 2> /tmp/emulator-stderr.log & | |
- name: Wait for emulator | |
run: | | |
sleep 10 | |
echo "Show emulator home" | |
curl --retry-connrefused --retry 6 http://localhost:4000 | |
echo "Show emulators" | |
curl --fail http://localhost:4400 | |
- name: Debug emulator's stdout and stderr if tests failed | |
if: failure() | |
run: | | |
echo "EMULATOR STDOUT........................................." | |
cat /tmp/emulator-stdout.log | |
echo "" | |
echo "EMULATOR STDERR........................................." | |
cat /tmp/emulator-stderr.log | |
- name: Build | |
env: | |
PUPPETEER_EXECUTABLE_PATH: /usr/bin/google-chrome | |
# These are NOT secrets. It's public stuff. | |
PREACT_APP_FIREBASE_APIKEY: AIzaSyBlMzrsBR_KWXDdgntBgnCThjRqr-0I8js | |
PREACT_APP_FIREBASE_AUTHDOMAIN: groce-dev.firebaseapp.com | |
PREACT_APP_FIREBASE_DATABASEURL: https://groce-dev.firebaseio.com | |
PREACT_APP_FIREBASE_PROJECTID: groce-dev | |
PREACT_APP_FIREBASE_STORAGEBUCKET: groce-dev.appspot.com | |
PREACT_APP_FIREBASE_MESSAGINGSENDERID: 170241343352 | |
PREACT_APP_FIREBASE_APPID: 1:170241343352:web:5282dd555337af2a62d28d | |
PREACT_APP_USE_EMULATOR: true | |
run: | | |
./bin/build | |
- name: Serve | |
run: yarn serve > /tmp/stdout.log 2> /tmp/stderr.log & | |
- name: Wait for server | |
run: curl --fail --retry-connrefused --retry 4 http://localhost:8080 > /dev/null | |
- name: Debug server's stdout and stderr if tests failed | |
if: failure() | |
run: | | |
echo "STDOUT.................................................." | |
cat /tmp/stdout.log | |
echo "" | |
echo "STDERR.................................................." | |
cat /tmp/stderr.log | |
- name: Run end-to-end tests | |
run: yarn e2e | |
- uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: Test Screenshots | |
path: test-screenshots/ | |
if-no-files-found: ignore |