<commit_before>name: Run tests for PyWebP
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.6, 3.7, 3.8, 3.9]
    steps:
      - uses: actions/checkout@v2
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}
      - name: Build the package
        run: |
          pip3 install build
          python3 -m build --sdist
      - name: Install the package
        run: |
          pip3 install dist/webp-*.tar.gz
      - name: Test with pytest
        run: |
          pip3 install pytest==5.4.3
          pytest tests/<commit_msg>Add Windows to CI<commit_after>name: Run tests for PyWebP

on: [push]

defaults:
  run:
    shell: bash

jobs:
  build-sdist:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Set up Python 3.6
        uses: actions/setup-python@v2
        with:
          python-version: 3.6
      - name: Create source distribution
        run: |
          pip3 install build
          python3 -m build --sdist
      - name: Upload source distribution
        uses: actions/upload-artifact@v2
        with:
          name: sdist-${{ github.sha }}
          path: dist/webp-*.tar.gz
          retention-days: 7

  test:
    needs: build-sdist
    strategy:
      matrix:
        python-version: [3.6, 3.7, 3.8, 3.9]
        os: [ubuntu-latest, windows-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v2
      - name: Fetch source distribution
        uses: actions/download-artifact@v2
        with:
          name: sdist-${{ github.sha }}
          path: dist/
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}
      - name: Install the package
        run: |
          pip3 install dist/webp-*.tar.gz
      - name: Test with pytest
        run: |
          pip3 install pytest==5.4.3
          pytest tests/
{'fraction_non_alphanumeric': 0.11245173745173745, 'fraction_numerical': 0.020752895752895753, 'mean_word_length': 1.667953667953668, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4203971', 'n_tokens_mistral': 678, 'n_tokens_neox': 657, 'n_words': 175}