-
Notifications
You must be signed in to change notification settings - Fork 0
Nightly CI Tests #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nightly CI Tests #13
Changes from all commits
a016f89
c782f98
43234ac
b545143
27387af
dd7b837
9694f45
2bfb1b0
79943e8
3c4974a
eb9660c
94ced57
696427c
5003397
89da17e
4026b63
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,21 +15,57 @@ | |
name: Firebase JS SDK Nightly | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
run: | ||
name: Execute tests | ||
name: Execute JS SDK Playwright tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- name: Set up Node (20) | ||
uses: actions/setup-node@v3 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
cache: 'npm' | ||
cache-dependency-path: yarn.lock | ||
- name: Restore cached node_modules | ||
uses: actions/cache@v4 | ||
id: node_modules | ||
with: | ||
path: "./node_modules" | ||
key: node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }} | ||
- name: Write Project Config | ||
env: | ||
PROJECT_CONFIG: ${{ secrets.PROJECT_CONFIG }} | ||
run: echo "export const firebaseConfig = $PROJECT_CONFIG;" > src/lib/app_tests/firebase.ts | ||
- name: Yarn install | ||
run: yarn | ||
run: yarn --frozen-lockfile | ||
- name: Restore yarn build cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.npm | ||
${{ github.workspace }}/.next/cache | ||
# Generate a new cache whenever packages or source files change. | ||
key: ${{ runner.os }}-nextjs-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a good idea 🤔 I wonder if I can use this in the SDK repo to re-use archived builds from different commits if there are no source changes. Would cut down the majority of the workflow time. |
||
# If source files changed but packages didn't, rebuild from a prior cache. | ||
restore-keys: | | ||
${{ runner.os }}-nextjs-${{ hashFiles('yarn.lock') }}- | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you accidentally left a hanging There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, it still matches the top key up until the second hasFiles. I actually copied this from "the manual", so it's legit! |
||
- name: Yarn build | ||
run: yarn build | ||
- name: Restore cached playwright browsers | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/ms-playwright | ||
key: playwright-${{ hashFiles('playwright.config.ts') }} | ||
- name: Install Playwright browsers | ||
run: yarn playwright install --with-deps | ||
- name: Launch E2E tests workflow | ||
run: | | ||
echo Hello World (TBD) | ||
run: yarn test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's in the
.next/cache
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a build cache or Next. Nexst complains if you don't use it in CI enviornments, I guess, so I cached it!