Add support of python 3.12 (#312) #406
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: Testing | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
python-version: [3.8, 3.9, 3.10.2, 3.11, 3.12] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install and configure Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: 1.3.2 | |
- name: Install dependencies | |
run: poetry install | |
- name: Test with pytest | |
run: | | |
poetry run pytest -rfs --cov --cov-config=.coveragerc --cov-report="" --disable-warnings | |
cp .coverage ".coverage.${{ matrix.python-version }}" | |
- name: Upload coverage report | |
uses: actions/upload-artifact@v3 | |
with: | |
name: coverage-reports | |
path: ".coverage.${{ matrix.python-version }}" | |
coverage-check: | |
name: Coverage check | |
runs-on: ubuntu-20.04 | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.12 | |
- name: Install dependencies | |
run: | | |
pip3 install coverage==7.2.3 | |
- name: Download coverage reports | |
uses: actions/download-artifact@v1 | |
with: | |
name: coverage-reports | |
- name: Combine reports | |
run: | | |
coverage combine coverage-reports | |
coverage report --fail-under=100 |