Skip to content

Commit

Permalink
archive dist/ dirs only
Browse files Browse the repository at this point in the history
  • Loading branch information
dlarocque committed Oct 31, 2024
1 parent cc58f7d commit 7ad3999
Showing 1 changed file with 43 additions and 7 deletions.
50 changes: 43 additions & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,57 @@ jobs:
- name: install Chrome stable
run: |
npx @puppeteer/browsers install chrome@stable
- name: Test setup and yarn install
- name: Test setup
run: |
cp config/ci.config.json config/project.json
yarn
- name: yarn build
run: yarn build
- name: Archive build
if: ${{ !cancelled() }}
run: |
tar -cf build.tar --exclude=.git .
gzip build.tar
tar -czvf dists.tar.gz $(find packages -name dist -type d)
- name: Upload build archive
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: build.tar.gz
path: build.tar.gz
retention-days: ${{ env.artifactRetentionDays }}
name: dists.tar.gz
path: dists.tar.gz
retention-days: ${{ env.artifactRetentionDays }}

test-the-rest:
name: (bulk) Node.js and Browser (Chrome) Tests
needs: build
runs-on: ubuntu-latest
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: Download build archive
uses: actions/download-artifact@v4
with:
name: dists.tar.gz
- name: Unzip build artifact
run: tar xf dists.tar.gz
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- 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') }}
- run: yarn install --frozen-lockfile
- name: Test setup
run: |
cp config/ci.config.json config/project.json
- name: Set start timestamp env var
run: echo "FIREBASE_CI_TEST_START_TIME=$(date +%s)" >> $GITHUB_ENV
- name: Run unit tests
# Ignore auth and firestore since they're handled in their own separate jobs.
run: |
xvfb-run yarn lerna run --ignore '{firebase-messaging-integration-test,@firebase/auth*,@firebase/firestore*,firebase-firestore-integration-test}' test:ci
node scripts/print_test_logs.js
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_CLI_TOKEN }}

0 comments on commit 7ad3999

Please sign in to comment.