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 }}
42 # Python < 3.10 is not available on macOS 14
44 python-version: '3.10'
46 python-version: '3.11'
48 python-version: '3.12'
50 python-version: 'pypy-3.8'
52 python-version: 'pypy-3.9'
54 python-version: 'pypy-3.10'
59 uses: actions/checkout@v4
61 - name: Set up Python ${{ matrix.python-version }}
62 uses: actions/setup-python@v5
64 python-version: ${{ matrix.python-version }}
67 uses: actions/cache@v4
69 # This path is specific to Ubuntu
71 # Look to see if there is a cache hit for the corresponding requirements file
72 key: v2-pip-${{ runner.os }}-${{ matrix.python-version }}
74 v2-pip-${{ runner.os }}
77 - name: Install dependencies
79 pip install setuptools
82 pip install myst-parser
84 - name: Build the code
85 run: python ./setup.py build_ext -i
88 run: python -m pytest tests
93 - name: Re-build with coverage info
94 run: CFLAGS="-coverage" python ./setup.py build_ext -i
96 - name: Test with coverage
97 run: python -m pytest tests
99 - name: Upload coverage to Codecov
100 uses: codecov/codecov-action@v4
102 #files: ./coverage1.xml,./coverage2.xml
103 #directory: ./coverage/reports/
106 name: codecov-python-${{ matrix.python-version }}
107 token: ${{ secrets.CODECOV_TOKEN }}
108 #fail_ci_if_error: true
111 - name: Build documentation