Skip to content

Commit

Permalink
Merge 3088977 into caf3090
Browse files Browse the repository at this point in the history
  • Loading branch information
dlarocque authored Oct 30, 2024
2 parents caf3090 + 3088977 commit f7f8dc0
Show file tree
Hide file tree
Showing 2 changed files with 120 additions and 12 deletions.
66 changes: 60 additions & 6 deletions .github/workflows/test-changed-auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,52 @@ env:
CHROMEDRIVER_CDNURL: https://googlechromelabs.github.io/
CHROMEDRIVER_CDNBINARIESURL: https://storage.googleapis.com/chrome-for-testing-public
CHROME_VALIDATED_VERSION: linux-120.0.6099.71
artifactRetentionDays: 14
# Bump Node memory limit
NODE_OPTIONS: "--max_old_space_size=4096"

jobs:
build:
name: Build the SDK
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
# This makes Actions fetch all Git history so build-changed script can diff properly.
fetch-depth: 0
# 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.
- name: install Chrome stable
run: |
npx @puppeteer/browsers install chrome@stable
- uses: actions/checkout@v3
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
node-version: 22.10.0
- name: Test setup and yarn install
run: |
cp config/ci.config.json config/project.json
yarn
- name: yarn build:changed auth
run: yarn build:changed auth
- name: Archive build
if: ${{ !cancelled() }}
run: |
tar -cf build.tar --exclude=.git .
gzip build.tar
- name: Upload build archive
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v3
with:
name: build.tar.gz
path: build.tar.gz
retention-days: ${{ env.artifactRetentionDays }}

test-chrome:
name: Test Auth on Chrome and Node If Changed
needs: build
runs-on: ubuntu-latest
steps:
# install Chrome first, so the correct version of webdriver can be installed by chromedriver
Expand All @@ -56,6 +96,12 @@ jobs:
with:
# This makes Actions fetch all Git history so run-changed script can diff properly.
fetch-depth: 0
- name: Download build archive
uses: actions/download-artifact@v3
with:
name: build.tar.gz
- name: Unzip build artifact
run: tar xf build.tar.gz
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
Expand All @@ -64,12 +110,11 @@ jobs:
run: |
cp config/ci.config.json config/project.json
yarn
- name: build
run: yarn build:changed auth
- name: Run tests on changed packages
run: xvfb-run yarn test:changed auth
test-firefox:
name: Test Auth on Firefox If Changed
needs: build
# Whatever version of Firefox comes with 22.04 is causing Firefox
# startup to hang when launched by karma. Need to look further into
# why.
Expand All @@ -96,15 +141,20 @@ jobs:
run: |
cp config/ci.config.json config/project.json
yarn
- name: build
run: yarn build:changed auth
- name: Download build archive
uses: actions/download-artifact@v3
with:
name: build.tar.gz
- name: Unzip build artifact
run: tar xf build.tar.gz
- name: Run tests on auth changed packages
run: xvfb-run yarn test:changed auth
env:
BROWSERS: 'Firefox'

test-webkit:
name: Test Auth on Webkit if Changed
needs: build
runs-on: macos-latest

steps:
Expand All @@ -121,8 +171,12 @@ jobs:
cp config/ci.config.json config/project.json
yarn
npx playwright install webkit
- name: build
run: yarn build:changed auth
- name: Download build archive
uses: actions/download-artifact@v3
with:
name: build.tar.gz
- name: Unzip build artifact
run: tar xf build.tar.gz
- name: Run tests on changed packages
run: yarn test:changed auth
env:
Expand Down
66 changes: 60 additions & 6 deletions .github/workflows/test-changed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,52 @@ name: Test Modified Packages
on: pull_request

env:
artifactRetentionDays: 14
# Bump Node memory limit
NODE_OPTIONS: "--max_old_space_size=4096"

jobs:
build:
name: Build the SDK
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
# This makes Actions fetch all Git history so build-changed script can diff properly.
fetch-depth: 0
# 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.
- name: install Chrome stable
run: |
npx @puppeteer/browsers install chrome@stable
- uses: actions/checkout@v3
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
node-version: 22.10.0
- name: Test setup and yarn install
run: |
cp config/ci.config.json config/project.json
yarn
- name: yarn build:changed core
run: yarn build:changed core
- name: Archive build
if: ${{ !cancelled() }}
run: |
tar -cf build.tar --exclude=.git .
gzip build.tar
- name: Upload build archive
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v3
with:
name: build.tar.gz
path: build.tar.gz
retention-days: ${{ env.artifactRetentionDays }}

test-chrome:
name: Test Packages With Changed Files in Chrome and Node
needs: build
runs-on: ubuntu-latest

steps:
Expand All @@ -43,13 +83,18 @@ jobs:
run: |
cp config/ci.config.json config/project.json
yarn
- name: build
run: yarn build:changed core
- name: Download build archive
uses: actions/download-artifact@v3
with:
name: build.tar.gz
- name: Unzip build artifact
run: tar xf build.tar.gz
- name: Run tests on changed packages
run: xvfb-run yarn test:changed core

test-firefox:
name: Test Packages With Changed Files in Firefox
needs: build
# Whatever version of Firefox comes with 22.04 is causing Firefox
# startup to hang when launched by karma. Need to look further into
# why.
Expand All @@ -72,8 +117,12 @@ jobs:
run: |
cp config/ci.config.json config/project.json
yarn
- name: build
run: yarn build:changed core
- name: Download build archive
uses: actions/download-artifact@v3
with:
name: build.tar.gz
- name: Unzip build artifact
run: tar xf build.tar.gz
- name: Run tests on changed packages
run: xvfb-run yarn test:changed core
env:
Expand All @@ -82,6 +131,7 @@ jobs:

test-webkit:
name: Test Packages With Changed Files in Webkit
needs: build
runs-on: macos-latest

steps:
Expand All @@ -98,8 +148,12 @@ jobs:
cp config/ci.config.json config/project.json
yarn
npx playwright install webkit
- name: build
run: yarn build:changed core
- name: Download build archive
uses: actions/download-artifact@v3
with:
name: build.tar.gz
- name: Unzip build artifact
run: tar xf build.tar.gz
- name: Run tests on changed packages
run: yarn test:changed core
env:
Expand Down

0 comments on commit f7f8dc0

Please sign in to comment.