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.
20 permissions: # added using https://github.com/step-security/secure-repo
26 runs-on: ${{ matrix.os }}
29 os: [ubuntu-22.04, macos-12]
45 uses: actions/checkout@v4
47 - name: Set up Python ${{ matrix.python-version }}
48 uses: actions/setup-python@v5
50 python-version: ${{ matrix.python-version }}
53 uses: actions/cache@v4
55 # This path is specific to Ubuntu
57 # Look to see if there is a cache hit for the corresponding requirements file
58 key: v2-pip-${{ runner.os }}-${{ matrix.python-version }}
60 v2-pip-${{ runner.os }}
63 - name: Install dependencies
65 pip install setuptools
68 pip install recommonmark
70 - name: Build the code
71 run: python ./setup.py build_ext -i
74 run: python -m pytest tests
79 - name: Re-build with coverage info
80 run: CFLAGS="-coverage" python ./setup.py build_ext -i
82 - name: Test with coverage
83 run: python -m pytest tests
85 - name: Upload coverage to Codecov
86 uses: codecov/codecov-action@v4
88 #files: ./coverage1.xml,./coverage2.xml
89 #directory: ./coverage/reports/
92 name: codecov-python-${{ matrix.python-version }}
93 token: ${{ secrets.CODECOV_TOKEN }}
94 #fail_ci_if_error: true
97 - name: Build documentation