<commit_before>name: Tests

on: [push, pull_request]

jobs:
  lint:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - uses: actions/setup-node@v1
        with:
          node-version: 14

      - run: npm ci

      - run: npm run lint

  tests-local:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - uses: actions/setup-node@v1
        with:
          node-version: 14

      # Note this is the way to set an environment variable that lives across
      # all steps
      # (https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable).
      - name: Set environment variables
        run: echo "PLAYWRIGHT_BROWSERS_PATH=$HOME/.playwright" >> $GITHUB_ENV

      # Cache all of our node_modules/ directories and playwright browser
      # binaries to save ~30 seconds of install time.
      - name: Restore node_modules/playwright
        id: cache
        uses: actions/cache@v2
        with:
          path: |
            node_modules
            */*/node_modules
            ${{ env.PLAYWRIGHT_BROWSERS_PATH }}
          key: npm-playwright-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}

      # Installs system dependencies needed for playwright. Not sure how to
      # cache this.
      - uses: microsoft/playwright-github-action@v1

      - name: NPM install
        if: steps.cache.outputs.cache-hit != 'true'
        run: npm ci

      - name: Lerna bootstrap
        if: steps.cache.outputs.cache-hit != 'true'
        run: npm run bootstrap

      - name: Build
        run: npm run build

      - name: Test
        env:
          BROWSERS: preset:local
          CONCURRENT_BROWSERS: 3
        run: npm run test

  tests-sauce:
    # We can't run Sauce tests on PRs from forked repos, since they don't have
    # access to secrets.
    if: github.event.pull_request == null || github.event.pull_request.head.repo.full_name == github.repository

    # Sauce tests are still unreliable. Run them, but don't mark a commit as
    # failing if it fails.
    continue-on-error: true

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - uses: actions/setup-node@v1
        with:
          node-version: 14

      # Note this is the way to set an environment variable that lives across
      # all steps
      # (https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable).
      - name: Set environment variables
        run: echo "PLAYWRIGHT_BROWSERS_PATH=$HOME/.playwright" >> $GITHUB_ENV

      # Cache all of our node_modules/ directories and playwright browser
      # binaries to save ~30 seconds of install time.
      - name: Restore node_modules/playwright
        id: cache
        uses: actions/cache@v2
        with:
          path: |
            node_modules
            */*/node_modules
            ${{ env.PLAYWRIGHT_BROWSERS_PATH }}
          key: npm-playwright-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}

      # Installs system dependencies needed for playwright. Not sure how to
      # cache this.
      - uses: microsoft/playwright-github-action@v1

      - name: NPM install
        if: steps.cache.outputs.cache-hit != 'true'
        run: npm ci

      - name: Lerna bootstrap
        if: steps.cache.outputs.cache-hit != 'true'
        run: npm run bootstrap

      - name: Lint
        run: npm run lint

      - name: Build
        run: npm run build

      - name: Test
        env:
          SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
          SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
          BROWSERS: preset:sauce
          # TODO We should be able to bump this up, but going above 2 currently
          # causes flakiness where the second test job (dev vs prod) fails to
          # set up the Sauce tunnel (maybe something to do with browsers still
          # shutting down on the Sauce VM from the previous run?).
          CONCURRENT_BROWSERS: 2
        run: npm run test
<commit_msg>Try to fix build (#1580)<commit_after>name: Tests

on: [push, pull_request]

jobs:
  lint:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - uses: actions/setup-node@v1
        with:
          node-version: 14

      - run: npm ci

      - run: npm run lint

  tests-local:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - uses: actions/setup-node@v1
        with:
          node-version: 14

      # Note this is the way to set an environment variable that lives across
      # all steps
      # (https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable).
      - name: Set environment variables
        run: echo "PLAYWRIGHT_BROWSERS_PATH=$HOME/.playwright" >> $GITHUB_ENV

      # Cache all of our node_modules/ directories and playwright browser
      # binaries to save ~30 seconds of install time.
      - name: Restore node_modules/playwright
        id: cache
        uses: actions/cache@v2
        with:
          path: |
            node_modules
            **/node_modules
            ${{ env.PLAYWRIGHT_BROWSERS_PATH }}
          key: npm-playwright-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}

      # Installs system dependencies needed for playwright. Not sure how to
      # cache this.
      - uses: microsoft/playwright-github-action@v1

      - name: NPM install
        if: steps.cache.outputs.cache-hit != 'true'
        run: npm ci

      - name: Lerna bootstrap
        if: steps.cache.outputs.cache-hit != 'true'
        run: npm run bootstrap

      - name: Build
        run: npm run build

      - name: Test
        env:
          BROWSERS: preset:local
          CONCURRENT_BROWSERS: 3
        run: npm run test

  tests-sauce:
    # We can't run Sauce tests on PRs from forked repos, since they don't have
    # access to secrets.
    if: github.event.pull_request == null || github.event.pull_request.head.repo.full_name == github.repository

    # Sauce tests are still unreliable. Run them, but don't mark a commit as
    # failing if it fails.
    continue-on-error: true

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - uses: actions/setup-node@v1
        with:
          node-version: 14

      # Note this is the way to set an environment variable that lives across
      # all steps
      # (https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable).
      - name: Set environment variables
        run: echo "PLAYWRIGHT_BROWSERS_PATH=$HOME/.playwright" >> $GITHUB_ENV

      # Cache all of our node_modules/ directories and playwright browser
      # binaries to save ~30 seconds of install time.
      - name: Restore node_modules/playwright
        id: cache
        uses: actions/cache@v2
        with:
          path: |
            node_modules
            */*/node_modules
            ${{ env.PLAYWRIGHT_BROWSERS_PATH }}
          key: npm-playwright-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}

      # Installs system dependencies needed for playwright. Not sure how to
      # cache this.
      - uses: microsoft/playwright-github-action@v1

      - name: NPM install
        if: steps.cache.outputs.cache-hit != 'true'
        run: npm ci

      - name: Lerna bootstrap
        if: steps.cache.outputs.cache-hit != 'true'
        run: npm run bootstrap

      - name: Lint
        run: npm run lint

      - name: Build
        run: npm run build

      - name: Test
        env:
          SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
          SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
          BROWSERS: preset:sauce
          # TODO We should be able to bump this up, but going above 2 currently
          # causes flakiness where the second test job (dev vs prod) fails to
          # set up the Sauce tunnel (maybe something to do with browsers still
          # shutting down on the Sauce VM from the previous run?).
          CONCURRENT_BROWSERS: 2
        run: npm run test

{'fraction_non_alphanumeric': 0.09446333171442448, 'fraction_numerical': 0.006070908207867897, 'mean_word_length': 2.07580283793876, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1177537', 'n_tokens_mistral': 2565, 'n_tokens_neox': 2368, 'n_words': 722}