Skip to content

Commit

Permalink
Fix to test-all .github workflow yaml file. (#7640)
Browse files Browse the repository at this point in the history
CI Changes only: Fixed a misaligned indentation on line #107 of test-all.yaml that cause a workflow execution failure in GitHub Action CI.

Includes an update to all of the test-all.yml chrome installation steps to use the npx install method.

There's a Failure in (Firestore) Node.js and Browser (Chrome) Tests, but this existed even before the npx update (when installing Chrome via apt-get). See this previous run. Since the Firestore issue still remains, the has been disabled (will skip) for now.

Also fixed the a problem setting the max heap size for node. Previous attempts echoed the value to the GITHUB_ENV variable on the command line, but this was producing errors. Changed it to use the worfklow env: directive and I have confirmed that the enviornment variable exists in the shell runtime (example echo output can be found in run unit tests step of this worklfow run).
  • Loading branch information
DellaBitta authored Sep 28, 2023
1 parent eff9530 commit 031f19b
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
build:
name: Build the SDK
runs-on: ubuntu-latest
env:
NODE_OPTIONS: "--max_old_space_size=4096"
steps:
# Install Chrome so the correct version of webdriver can be installed by chromedriver when
# setting up the repo. This must be done to build and execute Auth properly.
Expand All @@ -28,8 +30,6 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Bump Node memory limit
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
- name: Test setup and yarn install
run: |
cp config/ci.config.json config/project.json
Expand All @@ -54,12 +54,13 @@ jobs:
name: (bulk) Node.js and Browser (Chrome) Tests
needs: build
runs-on: ubuntu-latest
env:
NODE_OPTIONS: "--max_old_space_size=4096"
steps:
# install Chrome first, so the correct version of webdriver can be installed by chromedriver when setting up the repo
- name: install Chrome stable
run: |
sudo apt-get update
sudo apt-get install google-chrome-stable
npx @puppeteer/browsers install chrome@stable
- name: Download build archive
uses: actions/download-artifact@v3
with:
Expand All @@ -70,8 +71,6 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Bump Node memory limit
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
- name: Test setup and yarn install
run: |
cp config/ci.config.json config/project.json
Expand All @@ -98,12 +97,14 @@ jobs:
name: (Auth) Node.js and Browser (Chrome) Tests
needs: build
runs-on: ubuntu-latest
env:
NODE_OPTIONS: "--max_old_space_size=4096"
steps:
# install Chrome first, so the correct version of webdriver can be installed by chromedriver
# when setting up the repo
- name: install Chrome stable
run: |
npx @puppeteer/browsers install chrome@stable
- name: install Chrome stable
run: |
npx @puppeteer/browsers install chrome@stable
- name: Download build archive
uses: actions/download-artifact@v3
with:
Expand All @@ -114,8 +115,6 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Bump Node memory limit
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
- name: Test setup and yarn install
run: |
cp config/ci.config.json config/project.json
Expand All @@ -141,12 +140,16 @@ jobs:
name: (Firestore) Node.js and Browser (Chrome) Tests
needs: build
runs-on: ubuntu-latest
if: false
# Disable test for now since it's failing 100% of the time since
# https://github.com/firebase/firebase-js-sdk/pull/7453 and it needs to be investigated.
env:
NODE_OPTIONS: "--max_old_space_size=4096"
steps:
# install Chrome so the correct version of webdriver can be installed by chromedriver when setting up the repo
- name: install Chrome stable
run: |
sudo apt-get update
sudo apt-get install google-chrome-stable
npx @puppeteer/browsers install chrome@stable
- name: Download build archive
uses: actions/download-artifact@v3
with:
Expand All @@ -157,8 +160,6 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Bump Node memory limit
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
- name: Test setup and yarn install
run: |
cp config/ci.config.json config/project.json
Expand All @@ -171,6 +172,7 @@ jobs:
node scripts/print_test_logs.js
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_CLI_TOKEN }}
EXPERIMENTAL_MODE: true
- name: Generate coverage file
run: yarn ci:coverage
- name: Run coverage
Expand All @@ -179,7 +181,6 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./lcov-all.info
continue-on-error: true

test-firestore-integration:
strategy:
fail-fast: false
Expand All @@ -188,12 +189,13 @@ jobs:
name: Firestore Integration Tests (${{ matrix.persistence }})
needs: build
runs-on: ubuntu-latest
env:
NODE_OPTIONS: "--max_old_space_size=4096"
steps:
# install Chrome so the correct version of webdriver can be installed by chromedriver when setting up the repo
- name: install Chrome stable
run: |
sudo apt-get update
sudo apt-get install google-chrome-stable
npx @puppeteer/browsers install chrome@stable
- name: Download build archive
uses: actions/download-artifact@v3
with:
Expand All @@ -204,8 +206,6 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Bump Node memory limit
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
- run: cp config/ci.config.json config/project.json
- run: yarn
- run: yarn build:${{ matrix.persistence }}
Expand Down

0 comments on commit 031f19b

Please sign in to comment.