name: rosdistro-ci

on:
  push:
    branches: [master]
  pull_request:

jobs:
  build:
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest]
        python: ['3.7', '3.8', '3.9', '3.10']
        include:
        - os: ubuntu-18.04
          python: '2.7'
        - os: ubuntu-18.04
          python: '3.6'
    name: rosdistro tests
    runs-on: ${{matrix.os}}

    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{matrix.python}}
      uses: actions/setup-python@v2
      with:
        python-version: ${{matrix.python}}
    - name: Install dependencies
      run: |
        python -m pip install -U -e .[test] pytest-cov -c constraints.txt
    - name: Run tests
      run: |
        python -m pytest test --cov
