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 }}
43 # Python < 3.10 is not available on macOS 14
45 python-version: '3.10'
47 python-version: '3.11'
49 python-version: '3.12'
51 python-version: '3.13'
53 python-version: 'pypy-3.8'
55 python-version: 'pypy-3.9'
57 python-version: 'pypy-3.10'
62 uses: actions/checkout@v4
64 - name: Set up Python ${{ matrix.python-version }}
65 uses: actions/setup-python@v5
67 python-version: ${{ matrix.python-version }}
70 uses: actions/cache@v4
72 # This path is specific to Ubuntu
74 # Look to see if there is a cache hit for the corresponding requirements file
75 key: v2-pip-${{ runner.os }}-${{ matrix.python-version }}
77 v2-pip-${{ runner.os }}
80 - name: Install dependencies
82 pip install setuptools
85 pip install myst-parser
87 - name: Build the code
88 run: python ./setup.py build_ext -i
91 run: python -m pytest tests
96 - name: Re-build with coverage info
97 run: CFLAGS="-coverage" python ./setup.py build_ext -i
99 - name: Test with coverage
100 run: python -m pytest tests
102 - name: Upload coverage to Codecov
103 uses: codecov/codecov-action@v4
105 #files: ./coverage1.xml,./coverage2.xml
106 #directory: ./coverage/reports/
109 name: codecov-python-${{ matrix.python-version }}
110 token: ${{ secrets.CODECOV_TOKEN }}
111 #fail_ci_if_error: true
114 - name: Build documentation