summaryrefslogtreecommitdiff
path: root/.github/workflows/codeqa-test.yml
blob: 7d638cb529aaae66a67424d863448d42a976d3f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Python codeqa/test

on:
  pull_request:
    branches: "*"
  push:
    branches: "*"

jobs:
  flake8:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - name: Check code style with Flake8
      uses: TrueBrain/actions-flake8@v1.2
      with:
        path: src tests

  test:
    needs: [flake8]
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        python-version: [2.7, 3.5, 3.6, 3.8, pypy3]
        exclude:
        - os: ubuntu-latest
          python-version: 3.6
        - os: macos-latest
          python-version: 3.6
        - os: macos-latest
          python-version: pypy3
        - os: windows-latest
          python-version: 2.7
        - os: windows-latest
          python-version: 3.5
        - os: windows-latest
          python-version: pypy3
    runs-on: ${{ matrix.os }}
    steps:
    - uses: actions/checkout@v1
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v1
      with:
        python-version: ${{ matrix.python-version }}
    - name: Upgrade setuptools
      run: pip install "setuptools >= 40.9"
    - name: Install the project
      run: "pip install --no-binary=:all: ."
    - name: Install test dependencies
      run: pip install .[test]
    - name: Test with pytest
      run: pytest