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 }}
23 os: [ubuntu-22.04, macos-12]
36 uses: actions/checkout@v2
38 - name: Set up Python ${{ matrix.python-version }}
39 uses: actions/setup-python@v2
41 python-version: ${{ matrix.python-version }}
44 uses: actions/cache@v2
46 # This path is specific to Ubuntu
48 # Look to see if there is a cache hit for the corresponding requirements file
49 key: v1-pip-${{ runner.os }}-${{ matrix.python-version }}
51 v1-pip-${{ runner.os }}
54 - name: Install dependencies
59 - name: Install typing for old Python
60 run: pip install typing
61 if: matrix.installTyping
63 - name: Build the code
64 run: python ./setup.py build_ext -i
67 run: python -m pytest tests
72 - name: Re-build with coverage info
73 run: CFLAGS="-coverage" python ./setup.py build_ext -i
75 - name: Test with coverage
76 run: python -m pytest tests
78 - name: Upload coverage to Codecov
79 uses: codecov/codecov-action@v1
81 #files: ./coverage1.xml,./coverage2.xml
82 #directory: ./coverage/reports/
85 name: codecov-python-${{ matrix.python-version }}
86 #fail_ci_if_error: true
87 path_to_write_report: ./codecov-report.txt
90 - name: Archive code coverage result
91 uses: 'actions/upload-artifact@v2'
93 name: code-coverage-${{ matrix.os }}-${{ matrix.python-version }}
94 path: codecov-report.txt