name: CI

on:
  push:
  schedule:
    # run every Sunday (0th day) at 12:00 UTC (syntax: m h * * day)
    - cron: '0 12 * * 0'

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.7, 3.8]
    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -r requirements.txt
        pip install pytest-cov codecov
        pip install .
    - name: Test with pytest
      run: |
        pytest --cov=statmorph
    - name: Upload coverage to Codecov
      uses: codecov/codecov-action@v1

name: CI

on:
  push:
  pull_request:
  schedule:
    # run every Sunday (0th day) at 12:00 UTC (syntax: m h * * day)
    - cron: '0 12 * * 0'

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.7, 3.8]
    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -r requirements.txt
        pip install pytest-cov codecov
        pip install .
    - name: Test with pytest
      run: |
        pytest --cov=statmorph
    - name: Upload coverage to Codecov
      uses: codecov/codecov-action@v1

Enable CI for pull requests.
Enable CI for pull requests.
