<commit_before>name: Check and publish

on:
  push:
    branches: [master, develop]

  pull_request:
    branches: [master, develop]

  release:
    types: [created]

jobs:
  quality:
    name: Code QA
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - run: pip install black flake8 isort
      - run: black --version
      - run: isort --check .
      - run: black --check .
      - run: flake8 .

  checks:
    strategy:
      fail-fast: false
      matrix:
        platform: [ubuntu-latest, macos-latest, windows-latest]
        python-version: ["3.7", "3.8", "3.9"]
        method: ["conda", "ecmwflibs"]
        exclude:
          - platform: macos-latest
            python-version: "3.7"
            method: "conda"

    name: Python ${{ matrix.python-version }} on ${{ matrix.platform }} (${{ matrix.method }})
    runs-on: ${{ matrix.platform }}
    needs: quality

    defaults:
      run:
        shell: bash

    steps:
      - uses: actions/checkout@v2

      - uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}

      - if: matrix.method == 'conda'
        name: Setup conda
        uses: s-weigand/setup-conda@v1
        with:
          update-conda: true
          python-version: ${{ matrix.python-version }}
          conda-channels: anaconda, conda-forge

      - name: Install tools
        run: |
          python -m pip install --upgrade pip
          pip install pytest pytest-cov isort black flake8

      - if: matrix.method == 'conda'
        run: conda install eccodes

      - if: matrix.method == 'ecmwflibs'<commit_msg>Testing: Add requirement for conda to get latest ecCodes<commit_after>name: Check and publish

on:
  push:
    branches: [master, develop]

  pull_request:
    branches: [master, develop]

  release:
    types: [created]

jobs:
  quality:
    name: Code QA
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - run: pip install black flake8 isort
      - run: black --version
      - run: isort --check .
      - run: black --check .
      - run: flake8 .

  checks:
    strategy:
      fail-fast: false
      matrix:
        platform: [ubuntu-latest, macos-latest, windows-latest]
        python-version: ["3.7", "3.8", "3.9"]
        method: ["conda", "ecmwflibs"]
        exclude:
          - platform: macos-latest
            python-version: "3.7"
            method: "conda"

    name: Python ${{ matrix.python-version }} on ${{ matrix.platform }} (${{ matrix.method }})
    runs-on: ${{ matrix.platform }}
    needs: quality

    defaults:
      run:
        shell: bash

    steps:
      - uses: actions/checkout@v2

      - uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}

      - if: matrix.method == 'conda'
        name: Setup conda
        uses: s-weigand/setup-conda@v1
        with:
          update-conda: true
          python-version: ${{ matrix.python-version }}
          conda-channels: anaconda, conda-forge

      - name: Install tools
        run: |
          python -m pip install --upgrade pip
          pip install pytest pytest-cov isort black flake8

      - if: matrix.method == 'conda'
        run: conda install 'eccodes>=2.27.0'

      - if: matrix.method == 'ecmwflibs'
{'fraction_non_alphanumeric': 0.12488660417296643, 'fraction_numerical': 0.010281221651043242, 'mean_word_length': 1.8790252393385554, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, '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': '396798', 'n_tokens_mistral': 1080, 'n_tokens_neox': 1041, 'n_words': 269}