Skip to content

Commit 6b1ba55

Browse files
committed
Add deploy step to Firestore workflows and Firefox job
1 parent 8e92f9e commit 6b1ba55

File tree

4 files changed

+44
-0
lines changed

4 files changed

+44
-0
lines changed

.github/workflows/deploy-config.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Deploy Project Config
2+
3+
on: pull_request
4+
5+
# Detects if any project config files (rules or functions) have changed,
6+
# and deploys them to the test project used for CI if so.
7+
# Run this in its own workflow instead of as a step before each test
8+
# workflow to avoid too many deploys, possibly causing race conditions.
9+
# Since the build step of each test workflow takes a long time, this
10+
# this should finish before the tests begin running.
11+
12+
jobs:
13+
test:
14+
name: Deploy Firebase Project Rules and Functions
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout Repo
19+
uses: actions/checkout@master
20+
with:
21+
# This makes Actions fetch all Git history so run-changed script can diff properly.
22+
fetch-depth: 0
23+
- name: Set up Node (14)
24+
uses: actions/setup-node@v2
25+
with:
26+
node-version: 14.x
27+
- name: Yarn install
28+
run: yarn
29+
- name: Deploy project config if needed
30+
run: yarn ts-node scripts/ci-test/deploy-if-needed.ts
31+
env:
32+
FIREBASE_CLI_TOKEN: ${{secrets.FIREBASE_CLI_TOKEN}}

.github/workflows/test-changed-firestore-integration.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ jobs:
2323
sudo apt-get install google-chrome-stable
2424
- name: Bump Node memory limit
2525
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
26+
- name: Deploy project config if needed
27+
run: yarn ts-node scripts/ci-test/deploy-if-needed.ts
28+
env:
29+
FIREBASE_CLI_TOKEN: ${{secrets.FIREBASE_CLI_TOKEN}}
2630
- name: Test setup and yarn install
2731
run: |
2832
cp config/ci.config.json config/project.json

.github/workflows/test-changed-firestore.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ jobs:
2323
sudo apt-get install google-chrome-stable
2424
- name: Bump Node memory limit
2525
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
26+
- name: Deploy project config if needed
27+
run: yarn ts-node scripts/ci-test/deploy-if-needed.ts
28+
env:
29+
FIREBASE_CLI_TOKEN: ${{secrets.FIREBASE_CLI_TOKEN}}
2630
- name: Test setup and yarn install
2731
run: |
2832
cp config/ci.config.json config/project.json

.github/workflows/test-changed.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ jobs:
5555
sudo apt-get install firefox
5656
- name: Bump Node memory limit
5757
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
58+
- name: Deploy project config if needed
59+
run: yarn ts-node scripts/ci-test/deploy-if-needed.ts
60+
env:
61+
FIREBASE_CLI_TOKEN: ${{secrets.FIREBASE_CLI_TOKEN}}
5862
- name: Test setup and yarn install
5963
run: |
6064
cp config/ci.config.json config/project.json

0 commit comments

Comments
 (0)