1515name : Firebase JS SDK Nightly
1616
1717on :
18+ schedule :
19+ - cron : " 0 0 * * *"
20+ pull_request :
21+ branches :
22+ - main
1823 workflow_dispatch :
1924
2025jobs :
2126 run :
22- name : Execute tests
27+ name : Execute JS SDK Playwright tests
2328 runs-on : ubuntu-latest
2429 steps :
2530 - name : Checkout Repo
2631 uses : actions/checkout@v4
2732 - name : Set up Node (20)
28- uses : actions/setup-node@v3
33+ uses : actions/setup-node@v4
2934 with :
3035 node-version : 20.x
36+ cache : ' npm'
37+ cache-dependency-path : yarn.lock
38+ - name : Restore cached node_modules
39+ uses : actions/cache@v4
40+ id : node_modules
41+ with :
42+ path : " ./node_modules"
43+ key : node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
44+ - name : Write Project Config
45+ env :
46+ PROJECT_CONFIG : ${{ secrets.PROJECT_CONFIG }}
47+ run : echo "export const firebaseConfig = $PROJECT_CONFIG;" > src/lib/app_tests/firebase.ts
3148 - name : Yarn install
32- run : yarn
49+ run : yarn --frozen-lockfile
50+ - name : Restore yarn build cache
51+ uses : actions/cache@v4
52+ with :
53+ path : |
54+ ~/.npm
55+ ${{ github.workspace }}/.next/cache
56+ # Generate a new cache whenever packages or source files change.
57+ key : ${{ runner.os }}-nextjs-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
58+ # If source files changed but packages didn't, rebuild from a prior cache.
59+ restore-keys : |
60+ ${{ runner.os }}-nextjs-${{ hashFiles('yarn.lock') }}-
61+ - name : Yarn build
62+ run : yarn build
63+ - name : Restore cached playwright browsers
64+ uses : actions/cache@v4
65+ with :
66+ path : ~/.cache/ms-playwright
67+ key : playwright-${{ hashFiles('playwright.config.ts') }}
68+ - name : Install Playwright browsers
69+ run : yarn playwright install --with-deps
3370 - name : Launch E2E tests workflow
34- run : |
35- echo Hello World (TBD)
71+ run : yarn test
0 commit comments