6 runs-on: ${{ matrix.os }}
9 os: [ubuntu-latest, macos-latest]
22 installTyping: ${{ true }}
27 uses: actions/checkout@v2
29 - name: Set up Python ${{ matrix.python-version }}
30 uses: actions/setup-python@v2
32 python-version: ${{ matrix.python-version }}
35 uses: actions/cache@v2
37 # This path is specific to Ubuntu
39 # Look to see if there is a cache hit for the corresponding requirements file
40 key: v1-pip-${{ runner.os }}-${{ matrix.python-version }}
42 v1-pip-${{ runner.os }}
45 - name: Install dependencies
50 - name: Install typing for old Python
51 run: pip install typing
52 if: matrix.installTyping
54 - name: Build the code
55 run: python ./setup.py build_ext -i
58 run: python -m pytest tests
63 - name: Re-build with coverage info
64 run: CFLAGS="-coverage" python ./setup.py build_ext -i
66 - name: Test with coverage
67 run: python -m pytest tests
69 - name: Upload coverage to Codecov
70 uses: codecov/codecov-action@v1
72 #files: ./coverage1.xml,./coverage2.xml
73 #directory: ./coverage/reports/
76 name: codecov-python-${{ matrix.python-version }}
77 #fail_ci_if_error: true
78 path_to_write_report: ./codecov-report.txt
81 - name: Archive code coverage result
82 uses: 'actions/upload-artifact@v2'
84 name: code-coverage-${{ matrix.os }}-${{ matrix.python-version }}
85 path: codecov-report.txt