Update github automated testing for python 3.12 #30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: rdns_reaper RC CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11", "3.12"] | |
env: | |
OS: ${{ matrix.os }} | |
PYTHON: ${{ matrix.python--version }} | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install tox tox-gh-actions | |
- name: Run tox | |
run: tox | |
- name: Generate coverage report | |
if: "matrix.python-version == '3.9'" | |
run: | | |
pip install pytest | |
pip install pytest-cov | |
pip install pyyaml netaddr | |
pytest rdns_reaper/ --cov=./ --cov-report=xml --cov-branch | |
- name: Upload coverage to Codecov | |
if: "matrix.python-version == '3.9'" | |
uses: codecov/codecov-action@v3 | |
with: | |
# directory: ./coverage/reports/ | |
env_vars: OS,PYTHON | |
fail_ci_if_error: true | |
files: ./coverage.xml | |
flags: unittests | |
name: codecov-umbrella | |
path_to_write_report: ./coverage/codecov_report.txt | |
verbose: true |