diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4389b3d26bb3..9d5d671086ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,59 +22,21 @@ jobs: with: node-version: 10.x - - name: Setup protoc - uses: arduino/setup-protoc@7ad700d - with: - version: '3.7.1' - repo-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up Python - uses: actions/setup-python@v1 - with: - python-version: 2.7 - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - pip install protobuf==3.7.1 - - # Chrome Stable is already installed by default. - - name: Install Chrome ToT - working-directory: /home/runner - run: bash $GITHUB_WORKSPACE/lighthouse-core/scripts/download-chrome.sh && mv chrome-linux chrome-linux-tot - env: - CHROME_PATH: /home/runner/chrome-linux-tot - - # Cache yarn deps. thx https://github.com/actions/cache/blob/master/examples.md#node---yarn - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - name: Set up node_modules cache - uses: actions/cache@v1 - id: yarn-cache - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - run: yarn --frozen-lockfile - run: yarn build-all # Run tests that require headfull Chrome. - run: sudo apt-get install xvfb - - run: xvfb-run --auto-servernum yarn unit - - run: xvfb-run --auto-servernum yarn test-clients - - run: xvfb-run --auto-servernum yarn test-bundle - - run: xvfb-run --auto-servernum yarn test-docs - - - name: Smoke (ToT) - run: xvfb-run --auto-servernum yarn smoke --debug -j=1 --retries=2 - env: - CHROME_PATH: /home/runner/chrome-linux-tot/chrome - - name: Smoke (stable) - run: xvfb-run --auto-servernum yarn smoke --debug -j=1 --retries=2 - + - name: yarn test-clients + run: xvfb-run --auto-servernum yarn test-clients + - name: yarn test-bundle + run: xvfb-run --auto-servernum yarn test-bundle + - name: yarn test-docs + run: xvfb-run --auto-servernum yarn test-docs + - run: yarn diff:sample-json + - run: yarn type-check + - run: yarn lint - run: yarn test-lantern - run: yarn test-legacy-javascript - run: yarn i18n:checks @@ -101,11 +63,7 @@ jobs: # `unit` includes just unit and proto tests. unit: - strategy: - matrix: - os: [ubuntu-latest, windows-latest] - runs-on: ${{ matrix.os }} - name: unit_${{ matrix.os }} + runs-on: ubuntu-latest steps: - name: git clone @@ -136,30 +94,20 @@ jobs: - run: yarn test-proto # Run before unit-core because the roundtrip json is needed for proto tests. - run: sudo apt-get install xvfb - if: matrix.os == 'ubuntu-latest' - - name: yarn unit run: xvfb-run --auto-servernum yarn unit - if: matrix.os == 'ubuntu-latest' - - # For windows, just test the potentially platform-specific code. - - name: yarn unit-cli - run: yarn unit-cli - if: matrix.os == 'windows-latest' - - run: yarn diff:sample-json - if: matrix.os == 'windows-latest' # `smoke` runs as a matrix across 4 jobs: # * The smoketest groups are split across two runners, to parallelize. # * Then, those are run with both Chrome stable and ToT Chromium, in parallel smoke: + runs-on: ubuntu-latest strategy: matrix: chrome-channel: ['stable', 'ToT'] smoke-test-invert: [false, true] # e.g. if smoke 0 fails, continue with smoke 1 anyway fail-fast: false - runs-on: ubuntu-latest env: # The smokehouse tests run by job `smoke_0`. `smoke_1` will run the rest. SMOKE_GROUP_1: a11y oopif pwa pwa2 pwa3 dbw redirects errors offline @@ -187,24 +135,6 @@ jobs: - run: yarn --frozen-lockfile - run: sudo apt-get install xvfb - - name: Run smoke tests - run: xvfb-run --auto-servernum yarn smoke --debug -j=1 --retries=2 --invert-match ${{ matrix.smoke-test-invert }} $SMOKE_GROUP_1 - - # Only run smoke tests for windows against stable chrome. - smoke-windows: - runs-on: windows-latest - name: smoke_stable_windows - - steps: - - name: git clone - uses: actions/checkout@v2 - - - name: Use Node.js 10.x - uses: actions/setup-node@v1 - with: - node-version: 10.x - - - run: yarn --frozen-lockfile - name: Run smoke tests - run: yarn smoke --debug -j=1 --retries=2 dbw oopif offline lantern metrics + run: xvfb-run --auto-servernum yarn smoke --debug -j=1 --retries=2 --invert-match ${{ matrix.smoke-test-invert }} $SMOKE_GROUP_1 diff --git a/lighthouse-cli/test/smokehouse/lighthouse-runners/bundle.js b/lighthouse-cli/test/smokehouse/lighthouse-runners/bundle.js index f070a76c6fa1..e8f38b2e5886 100644 --- a/lighthouse-cli/test/smokehouse/lighthouse-runners/bundle.js +++ b/lighthouse-cli/test/smokehouse/lighthouse-runners/bundle.js @@ -15,7 +15,7 @@ const ChromeLauncher = require('chrome-launcher'); const ChromeProtocol = require('../../../../lighthouse-core/gather/connections/cri.js'); // Load bundle, which creates a `global.runBundledLighthouse`. -// @ts-ignore - file exists if `yarn build-all` is run, but not used for types anyways. +// @ts-ignore - file won't exist until `yarn build-all`, but not used for types anyways. require('../../../../dist/lighthouse-dt-bundle.js'); // eslint-disable-line /** @type {import('../../../../lighthouse-core/index.js')} */