name: Continuous Integration
on:
  schedule:
    - cron: '0 0 * * 3'
  push:
    branches:
      - master
  pull_request:
    branches:
      - master
    paths:
      - .github/workflows/ci.yml
      - pyclibrary/*
      - tests/*
      - setup.py

jobs:
  tests:
    name: Unit tests
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
        python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
    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
      - name: Install project
        run: |
          python setup.py develop
      - name: Test with pytest
        run: |
          pip install pytest-cov
          python -m pytest tests --cov pyclibrary --cov-report xml -v
      - name: Upload coverage to Codecov
        uses: codecov/codecov-action@v1
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          flags: unittests
          name: codecov-umbrella
          fail_ci_if_error: true
      - name: Test with oldest supported pyparsing
        run: |
          pip install pyparsing==2.3.1
          python -m pytest tests
      - name: Test with latest supported pyparsing
        run: |
          pip install --upgrade --upgrade-strategy eager pyparsing
          python -m pytest tests

name: Continuous Integration
on:
  schedule:
    - cron: '0 0 * * 3'
  push:
    branches:
      - master
  pull_request:
    branches:
      - master
    paths:
      - .github/workflows/ci.yml
      - pyclibrary/*
      - tests/*
      - setup.py

jobs:
  tests:
    name: Unit tests
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
        python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
    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
      - name: Install project with the latest dependency versions
        run: |
          pip install --upgrade --upgrade-strategy eager -e .
      - name: Test with pytest
        run: |
          pip install pytest-cov
          python -m pytest tests --cov pyclibrary --cov-report xml -v
      - name: Upload coverage to Codecov
        uses: codecov/codecov-action@v1
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          flags: unittests
          name: codecov-umbrella
          fail_ci_if_error: true
      - name: Test with the oldest supported dependency versions
        run: |
          pip install pyparsing==2.3.1
          python -m pytest tests

Install project with the latest dependency versions and test older dependency versions afterwards
Install project with the latest dependency versions and test older dependency versions afterwards
