2 # Trigger the workflow on push or
3 # pull request, but only for the
11 # Allow manual triggering
13 # Weekly run to account for
14 # changed dependencies.
22 runs-on: ${{ matrix.os }}
25 os: [ubuntu-22.04, macos-12]
38 uses: actions/checkout@v2
40 - name: Set up Python ${{ matrix.python-version }}
41 uses: actions/setup-python@v2
43 python-version: ${{ matrix.python-version }}
46 uses: actions/cache@v2
48 # This path is specific to Ubuntu
50 # Look to see if there is a cache hit for the corresponding requirements file
51 key: v2-pip-${{ runner.os }}-${{ matrix.python-version }}
53 v2-pip-${{ runner.os }}
56 - name: Install dependencies
61 pip install recommonmark
63 - name: Install typing for old Python
64 run: pip install typing
65 if: matrix.installTyping
67 - name: Build the code
68 run: python ./setup.py build_ext -i
71 run: python -m pytest tests
76 - name: Re-build with coverage info
77 run: CFLAGS="-coverage" python ./setup.py build_ext -i
79 - name: Test with coverage
80 run: python -m pytest tests
82 - name: Upload coverage to Codecov
83 uses: codecov/codecov-action@v1
85 #files: ./coverage1.xml,./coverage2.xml
86 #directory: ./coverage/reports/
89 name: codecov-python-${{ matrix.python-version }}
90 #fail_ci_if_error: true
91 path_to_write_report: ./codecov-report.txt
94 - name: Archive code coverage result
95 uses: 'actions/upload-artifact@v2'
97 name: code-coverage-${{ matrix.os }}-${{ matrix.python-version }}
98 path: codecov-report.txt
100 - name: Build documentation