2023-08-27 16:16:41 +00:00
|
|
|
---
|
|
|
|
name: CI
|
2021-04-30 19:47:21 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
- push
|
|
|
|
- pull_request
|
|
|
|
|
2023-08-27 16:16:41 +00:00
|
|
|
env:
|
2023-10-26 23:38:58 +00:00
|
|
|
DEFAULT_PYTHON: '3.12'
|
2023-08-27 16:16:41 +00:00
|
|
|
|
2021-04-30 19:47:21 +00:00
|
|
|
jobs:
|
2023-08-27 16:16:41 +00:00
|
|
|
tests:
|
2021-04-30 19:47:21 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-02-18 16:26:54 +00:00
|
|
|
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
|
2021-04-30 19:47:21 +00:00
|
|
|
|
|
|
|
steps:
|
2023-09-05 07:10:11 +00:00
|
|
|
- uses: actions/checkout@v4
|
2021-04-30 19:47:21 +00:00
|
|
|
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
2023-12-07 07:42:43 +00:00
|
|
|
uses: actions/setup-python@v5
|
2021-04-30 19:47:21 +00:00
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
pip install tox tox-gh-actions
|
|
|
|
|
|
|
|
- name: Test with tox
|
|
|
|
run: tox
|
2023-08-27 16:16:41 +00:00
|
|
|
if: ${{ matrix.python-version != env.DEFAULT_PYTHON }}
|
2021-05-01 11:30:33 +00:00
|
|
|
|
|
|
|
- name: Test with tox (and upload coverage)
|
2024-06-14 06:03:41 +00:00
|
|
|
uses: paambaati/codeclimate-action@v8.0.0
|
2023-08-27 16:16:41 +00:00
|
|
|
if: ${{ matrix.python-version == env.DEFAULT_PYTHON }}
|
2021-05-01 11:30:33 +00:00
|
|
|
env:
|
2021-05-12 10:54:45 +00:00
|
|
|
CC_TEST_REPORTER_ID: 2a411f596959fc32f5d73f3ba7cef8cc4d5733299d742dbfc97fd6c190b9010c
|
2021-05-01 11:30:33 +00:00
|
|
|
with:
|
|
|
|
coverageCommand: tox
|
|
|
|
coverageLocations: |
|
|
|
|
${{ github.workspace }}/.tox/reports/*/coverage.xml:coverage.py
|
|
|
|
prefix: ${{ github.workspace }}/.tox/py39/lib/python3.9/site-packages
|
2021-05-01 09:27:05 +00:00
|
|
|
|
2024-02-01 07:19:23 +00:00
|
|
|
- uses: codecov/codecov-action@v4
|
2021-05-01 09:27:05 +00:00
|
|
|
with:
|
|
|
|
directory: '.tox/reports'
|