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'
55 uses: actions/checkout@v4
57 - name: Set up Python ${{ matrix.python-version }}
58 uses: actions/setup-python@v5
60 python-version: ${{ matrix.python-version }}
63 uses: actions/cache@v4
65 # This path is specific to Ubuntu
67 # Look to see if there is a cache hit for the corresponding requirements file
68 key: v2-pip-${{ runner.os }}-${{ matrix.python-version }}
70 v2-pip-${{ runner.os }}
73 - name: Install dependencies
75 pip install setuptools
78 pip install myst-parser
80 - name: Build the code
81 run: python ./setup.py build_ext -i
84 run: python -m pytest tests
89 - name: Re-build with coverage info
90 run: CFLAGS="-coverage" python ./setup.py build_ext -i
92 - name: Test with coverage
93 run: python -m pytest tests
95 - name: Upload coverage to Codecov
96 uses: codecov/codecov-action@v4
98 #files: ./coverage1.xml,./coverage2.xml
99 #directory: ./coverage/reports/
102 name: codecov-python-${{ matrix.python-version }}
103 token: ${{ secrets.CODECOV_TOKEN }}
104 #fail_ci_if_error: true
107 - name: Build documentation