15
15
name : Firebase JS SDK Nightly
16
16
17
17
on :
18
+ schedule :
19
+ - cron : " 0 0 * * *"
20
+ pull_request :
21
+ branches :
22
+ - main
18
23
workflow_dispatch :
19
24
20
25
jobs :
21
26
run :
22
- name : Execute tests
27
+ name : Execute JS SDK Playwright tests
23
28
runs-on : ubuntu-latest
24
29
steps :
25
30
- name : Checkout Repo
26
31
uses : actions/checkout@v4
27
32
- name : Set up Node (20)
28
- uses : actions/setup-node@v3
33
+ uses : actions/setup-node@v4
29
34
with :
30
35
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
31
48
- 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
33
70
- name : Launch E2E tests workflow
34
- run : |
35
- echo Hello World (TBD)
71
+ run : yarn test
0 commit comments