<commit_before>name: Test Suite
on: [push, pull_request]
jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.6', '3.7', '3.8']
        django-version: ['>=2.2,<2.3', '>=3.0,<3.1']
    name: Test Python ${{ matrix.python-version }} Django ${{ matrix.django-version }}
    steps:
      - uses: actions/checkout@v2
      - name: Setup Python
        uses: actions/setup-python@v1
        with:
          python-version: ${{ matrix.python-version }}
      - name: pip cache
        uses: actions/cache@v1
        with:
          path: ~/.cache/pip
          key: ${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}
          restore-keys: ${{ runner.os }}-pip
      - name: Install dependencies
        run: |
          pip install --upgrade django'${{ matrix.django-version }}'
          pip install --upgrade -r test-requirements.txt
          pip install .
      - name: Run tests
        env:
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          GCLOUD_CREDENTIALS: ${{ secrets.GCLOUD_CREDENTIALS }}
        run: |
          if [[ "${{github.repository}}" != "antonagestam/collectfast" ]]; then
            export SKIP_LIVE_TESTS=true
          fi
          coverage run -m pytest
          coverage xml
      - name: Coveralls
        # See https://github.com/coverallsapp/github-action/pull/25
        uses: ly-cultureiq/github-action@support-cobertura
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          parallel: true
          path-to-file: coverage.xml
          coverage-format: cobertura
  lint:
    name: Static analysis
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Set up Python
        uses: actions/setup-python@v1
        with:
          python-version: 3.8
      - name: pip cache
        uses: actions/cache@v1
        with:
          path: ~/.cache/pip
          key: ${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}
          restore-keys: ${{ runner.os }}-pip
      - name: Install dependencies
        run: |
          pip install --upgrade 'django>=3.0,<3.1'
          pip install --upgrade -r test-requirements.txt
          pip install --upgrade -r lint-requirements.txt
          pip install .
      - name: mypy cache
        uses: actions/cache@v1
        with:
          path: .mypy_cache
          key: ${{ runner.os }}-mypy
          restore-keys: ${{ runner.os }}-mypy
      - run: flake8
      - run: PYTHONPATH=. sorti --check .
      - run: black --check .
      - run: mypy
  finish:
    name: Send collected statistics
    runs-on: ubuntu-latest
    needs: [test, lint]
    steps:
      - name: Send "parallel finished" to Coveralls
        uses: coverallsapp/github-action@master
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          parallel-finished: true<commit_msg>Don't run full test-suite for PRs (#180)<commit_after>name: Test Suite
on: [push, pull_request]
jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.6', '3.7', '3.8']
        django-version: ['>=2.2,<2.3', '>=3.0,<3.1']
    name: Test Python ${{ matrix.python-version }} Django ${{ matrix.django-version }}
    steps:
      - uses: actions/checkout@v2
      - name: Setup Python
        uses: actions/setup-python@v1
        with:
          python-version: ${{ matrix.python-version }}
      - name: pip cache
        uses: actions/cache@v1
        with:
          path: ~/.cache/pip
          key: ${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}
          restore-keys: ${{ runner.os }}-pip
      - name: Install dependencies
        run: |
          pip install --upgrade django'${{ matrix.django-version }}'
          pip install --upgrade -r test-requirements.txt
          pip install .
      - name: Run all tests
        env:
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          GCLOUD_CREDENTIALS: ${{ secrets.GCLOUD_CREDENTIALS }}
        if: github.event_name == 'push' && github.repository == 'antonagestam/collectfast'
        run: coverage run -m pytest
      - name: Run non-live tests
        env:
          SKIP_LIVE_TESTS: true
        if: github.event_name != 'push' || github.repository != 'antonagestam/collectfast'
        run: coverage run -m pytest
      - run: coverage xml
      - name: Coveralls
        # See https://github.com/coverallsapp/github-action/pull/25
        uses: ly-cultureiq/github-action@support-cobertura
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          parallel: true
          path-to-file: coverage.xml
          coverage-format: cobertura
  lint:
    name: Static analysis
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Set up Python
        uses: actions/setup-python@v1
        with:
          python-version: 3.8
      - name: pip cache
        uses: actions/cache@v1
        with:
          path: ~/.cache/pip
          key: ${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}
          restore-keys: ${{ runner.os }}-pip
      - name: Install dependencies
        run: |
          pip install --upgrade 'django>=3.0,<3.1'
          pip install --upgrade -r test-requirements.txt
          pip install --upgrade -r lint-requirements.txt
          pip install .
      - name: mypy cache
        uses: actions/cache@v1
        with:
          path: .mypy_cache
          key: ${{ runner.os }}-mypy
          restore-keys: ${{ runner.os }}-mypy
      - run: flake8
      - run: PYTHONPATH=. sorti --check .
      - run: black --check .
      - run: mypy
  finish:
    name: Send collected statistics
    runs-on: ubuntu-latest
    needs: [test, lint]
    steps:
      - name: Send "parallel finished" to Coveralls
        uses: ly-cultureiq/github-action@support-cobertura
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          parallel-finished: true
{'fraction_non_alphanumeric': 0.12996031746031747, 'fraction_numerical': 0.010416666666666666, 'mean_word_length': 1.860047281323877, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '798091', 'n_tokens_mistral': 1946, 'n_tokens_neox': 1868, 'n_words': 438}