Skip to content

Add ci workflow to run unit tests on pr or merge into main branches S… #1

Add ci workflow to run unit tests on pr or merge into main branches S…

Add ci workflow to run unit tests on pr or merge into main branches S… #1

Workflow file for this run

name: CI
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- trunk
- 'fix*'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set Up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Display Python Version
run: python -c "import sys; print(sys.version)"
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install coverage
- name: Run Unit Tests
run: |
coverage run -m pytest unit_tests
- name: Evaluate Coverage
coverage report --omit="unit_tests/*" -i --fail-under=30