<commit_before>name: Continuous Integration Tests

on:
  pull_request:
    branches: [master, develop]

jobs:
  build:

    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest]
        python-version: [3.8]

    steps:
    - name: Checkout
      uses: actions/checkout@v2

    - name: Setup Miniconda
      uses: conda-incubator/setup-miniconda@v1
      with:
        python-version: ${{ matrix.python-version }}
        channels: conda-forge
        auto-update-conda: true
        miniconda-version: "latest"
        activate-environment: ci_test

    - name: Set up Conda environment
      shell: bash -l {0}
      run: |
        conda config --set always_yes yes --set changeps1 no
        conda install -q -n ci_test python=${{ matrix.python-version }}
        conda env update -q -n ci_test -f environment.yml
        conda list -n ci_test

    - name: Install gcc for macOS
      shell: bash -l {0}
      if: ${{ matrix.os == 'macos-latest'}}
      run: |
        brew install gcc
        which gfortran

    - name: Build using pip
      shell: bash -l {0}
      run: |
        conda env list
        pip install --no-deps .

    - name: Run tests
      shell: bash -l {0}
      run: |
        conda env list
        python examples/notebooks/test_notebooks.py
        export MPLBACKEND=Agg
        make -C examples/python -f Makefile no-timing
        mkdir empty && cd empty
        python -c "import pyshtools"<commit_msg>Update CI workflow to cancel previous jobs<commit_after>name: Continuous Integration Tests

on:
  pull_request:
    branches: [master, develop]

jobs:
  build:

    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest]
        python-version: [3.8]

    steps:
    - name: Cancel Previous Runs
      uses: styfle/cancel-workflow-action@0.5
      with:
        access_token: ${{ github.token }}

    - name: Checkout
      uses: actions/checkout@v2

    - name: Setup Miniconda
      uses: conda-incubator/setup-miniconda@v1
      with:
        python-version: ${{ matrix.python-version }}
        channels: conda-forge
        auto-update-conda: true
        miniconda-version: "latest"
        activate-environment: ci_test

    - name: Set up Conda environment
      shell: bash -l {0}
      run: |
        conda config --set always_yes yes --set changeps1 no
        conda install -q -n ci_test python=${{ matrix.python-version }}
        conda env update -q -n ci_test -f environment.yml
        conda list -n ci_test

    - name: Install gcc for macOS
      shell: bash -l {0}
      if: ${{ matrix.os == 'macos-latest' }}
      run: |
        brew install gcc

    - name: Build using pip
      shell: bash -l {0}
      run: |
        conda env list
        pip install --no-deps .

    - name: Run tests
      shell: bash -l {0}
      run: |
        conda env list
        python examples/notebooks/test_notebooks.py
        export MPLBACKEND=Agg
        make -C examples/python -f Makefile no-timing
        mkdir empty && cd empty
        python -c "import pyshtools"
{'fraction_non_alphanumeric': 0.10003185727938833, 'fraction_numerical': 0.0063714558776680474, 'mean_word_length': 1.899353647276085, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7364365', 'n_tokens_mistral': 1032, 'n_tokens_neox': 980, 'n_words': 296}