2 # Trigger the workflow on push or
3 # pull request, but only for the
11 # Weekly run to account for
12 # changed dependencies.
20 runs-on: ${{ matrix.os }}
36 installTyping: ${{ true }}
41 uses: actions/checkout@v2
43 - name: Set up Python ${{ matrix.python-version }}
44 uses: actions/setup-python@v2
46 python-version: ${{ matrix.python-version }}
49 uses: actions/cache@v2
51 # This path is specific to Ubuntu
53 # Look to see if there is a cache hit for the corresponding requirements file
54 key: v1-pip-${{ runner.os }}-${{ matrix.python-version }}
56 v1-pip-${{ runner.os }}
59 - name: Install dependencies
63 sudo apt-get install -yy libacl1-dev
65 - name: Install typing for old Python
66 run: pip install typing
67 if: matrix.installTyping
69 - name: Build the code
70 run: python ./setup.py build_ext -i
73 run: python -m pytest tests
78 - name: Re-build with coverage info
79 run: CFLAGS="-coverage" python ./setup.py build_ext -i
81 - name: Test with coverage
82 run: python -m pytest tests
84 - name: Upload coverage to Codecov
85 uses: codecov/codecov-action@v1
87 #files: ./coverage1.xml,./coverage2.xml
88 #directory: ./coverage/reports/
91 name: codecov-python-${{ matrix.python-version }}
92 #fail_ci_if_error: true
93 path_to_write_report: ./codecov-report.txt
96 - name: Archive code coverage result
97 uses: 'actions/upload-artifact@v2'
99 name: code-coverage-${{ matrix.os }}-${{ matrix.python-version }}
100 path: codecov-report.txt