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]
42 uses: actions/checkout@v2
44 - name: Set up Python ${{ matrix.python-version }}
45 uses: actions/setup-python@v2
47 python-version: ${{ matrix.python-version }}
50 uses: actions/cache@v2
52 # This path is specific to Ubuntu
54 # Look to see if there is a cache hit for the corresponding requirements file
55 key: v2-pip-${{ runner.os }}-${{ matrix.python-version }}
57 v2-pip-${{ runner.os }}
60 - name: Install dependencies
64 pip install recommonmark
66 - name: Build the code
67 run: python ./setup.py build_ext -i
70 run: python -m pytest tests
75 - name: Re-build with coverage info
76 run: CFLAGS="-coverage" python ./setup.py build_ext -i
78 - name: Test with coverage
79 run: python -m pytest tests
81 - name: Upload coverage to Codecov
82 uses: codecov/codecov-action@v3
84 #files: ./coverage1.xml,./coverage2.xml
85 #directory: ./coverage/reports/
88 name: codecov-python-${{ matrix.python-version }}
89 #fail_ci_if_error: true
93 - name: Build documentation