| 1 |
name: CI |
| 2 |
|
| 3 |
on: |
| 4 |
push: { branches: [master, dev] } |
| 5 |
pull_request: { branches: [master, dev] } |
| 6 |
|
| 7 |
jobs: |
| 8 |
build: |
| 9 |
runs-on: ubuntu-latest |
| 10 |
env: |
| 11 |
DEFAULT_PYTHON: '3.14' |
| 12 |
strategy: |
| 13 |
matrix: |
| 14 |
python-version: ['3.10','3.11','3.12','3.13','3.14'] |
| 15 |
architecture: ['x64'] |
| 16 |
|
| 17 |
steps: |
| 18 |
- uses: actions/checkout@v3 |
| 19 |
|
| 20 |
- name: Setup Python |
| 21 |
uses: actions/setup-python@v4 |
| 22 |
with: |
| 23 |
python-version: ${{ matrix.python-version }} |
| 24 |
architecture: ${{ matrix.architecture }} |
| 25 |
cache: pip |
| 26 |
cache-dependency-path: pyproject.toml |
| 27 |
|
| 28 |
- name: Install nox |
| 29 |
run: pip install nox==2025.5.1 |
| 30 |
|
| 31 |
- name: Lint with flake8 |
| 32 |
if: ${{ matrix.python-version == '3.14' }} |
| 33 |
run: | |
| 34 |
nox -s flake8 -- deepdiff --count --select=E9,F63,F7,F82 --show-source --statistics |
| 35 |
nox -s flake8 -- deepdiff --count --exit-zero --max-complexity=26 --max-line-length=250 --statistics |
| 36 |
|
| 37 |
- name: Test with pytest (no coverage) |
| 38 |
if: ${{ matrix.python-version != '3.14' }} |
| 39 |
run: | |
| 40 |
nox -s pytest-${{ matrix.python-version }} -- --benchmark-disable tests/ |
| 41 |
|
| 42 |
- name: Test with pytest (+ coverage) |
| 43 |
if: ${{ matrix.python-version == '3.14' }} |
| 44 |
run: | |
| 45 |
nox -s pytest-${{ matrix.python-version }} -- \ |
| 46 |
--benchmark-disable \ |
| 47 |
--cov-report=xml \ |
| 48 |
--cov=deepdiff \ |
| 49 |
tests/ --runslow |
| 50 |
|
| 51 |
- name: Upload coverage |
| 52 |
if: ${{ matrix.python-version == '3.14' }} |
| 53 |
uses: codecov/codecov-action@v4 |
| 54 |
with: |
| 55 |
token: ${{ secrets.CODECOV_TOKEN }} |
| 56 |
file: coverage.xml |
| 57 |
env_vars: OS,PYTHON |
| 58 |
fail_ci_if_error: true |