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 }}
40 # Pypy-3.10 nightly seems to have some issues in bootstrapping
41 # - 'pypy-3.10-nightly'
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: 'pypy-3.8'
56 uses: actions/checkout@v4
58 - name: Set up Python ${{ matrix.python-version }}
59 uses: actions/setup-python@v5
61 python-version: ${{ matrix.python-version }}
64 uses: actions/cache@v4
66 # This path is specific to Ubuntu
68 # Look to see if there is a cache hit for the corresponding requirements file
69 key: v2-pip-${{ runner.os }}-${{ matrix.python-version }}
71 v2-pip-${{ runner.os }}
74 - name: Install dependencies
76 pip install setuptools
79 pip install myst-parser
81 - name: Build the code
82 run: python ./setup.py build_ext -i
85 run: python -m pytest tests
90 - name: Re-build with coverage info
91 run: CFLAGS="-coverage" python ./setup.py build_ext -i
93 - name: Test with coverage
94 run: python -m pytest tests
96 - name: Upload coverage to Codecov
97 uses: codecov/codecov-action@v4
99 #files: ./coverage1.xml,./coverage2.xml
100 #directory: ./coverage/reports/
103 name: codecov-python-${{ matrix.python-version }}
104 token: ${{ secrets.CODECOV_TOKEN }}
105 #fail_ci_if_error: true
108 - name: Build documentation