Skip to content

chore: improved ci testing strategy to reduce build time #135

chore: improved ci testing strategy to reduce build time

chore: improved ci testing strategy to reduce build time #135

Workflow file for this run

name: CI - Run Tox Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Check out the code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: python3 -m pip install -U pip tox
- name: Run Tox for Python Tests
run: tox -e py${{ matrix.python-version }}
- name: Generate coverage report
run: |
python3 -m pip install -U coverage
coverage xml -o coverage.xml
if: success()
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
verbose: true
if: success()
checks:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: python3 -m pip install -U pip tox
- name: Run Linting, Formatting, Security and Type Checks
run: tox -e lint,format,security,type
docs:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: python3 -m pip install -U pip tox
- name: Build Project Documentation
run: tox -e docs