[Defer Uploads v2] Added support for handling multiple root resource in single asset discovery phase #4481
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 14 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
node_modules | |
packages/*/node_modules | |
packages/core/.local-chromium | |
key: > | |
${{ runner.os }}/node-14/ | |
${{ hashFiles('.github/.cache-key') }}/ | |
${{ hashFiles('**/yarn.lock') }} | |
restore-keys: > | |
${{ runner.os }}/node-14/ | |
${{ hashFiles('.github/.cache-key') }}/ | |
- run: yarn | |
- run: yarn build | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: packages/*/dist | |
test: | |
name: Test ${{ matrix.package }} | |
needs: [build] | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node: [14] | |
package: | |
- '@percy/env' | |
- '@percy/client' | |
- '@percy/dom' | |
- '@percy/logger' | |
- '@percy/config' | |
- '@percy/core' | |
- '@percy/cli' | |
- '@percy/cli-command' | |
- '@percy/cli-exec' | |
- '@percy/cli-snapshot' | |
- '@percy/cli-upload' | |
- '@percy/cli-build' | |
- '@percy/cli-config' | |
- '@percy/sdk-utils' | |
- '@percy/webdriver-utils' | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
node_modules | |
packages/*/node_modules | |
packages/core/.local-chromium | |
key: > | |
${{ runner.os }}/node-${{ matrix.node }}/ | |
${{ hashFiles('.github/.cache-key') }}/ | |
${{ hashFiles('**/yarn.lock') }} | |
restore-keys: > | |
${{ runner.os }}/node-${{ matrix.node }}/ | |
${{ hashFiles('.github/.cache-key') }}/ | |
- uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
path: packages | |
- run: yarn | |
- name: Install browser dependencies | |
run: sudo apt-get install -y libgbm-dev | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
- name: Run tests | |
run: yarn workspace ${{ matrix.package }} test:coverage --colors |