Skip to content

Merge pull request #2 from mathspace/add-ci-test-suite #4

Merge pull request #2 from mathspace/add-ci-test-suite

Merge pull request #2 from mathspace/add-ci-test-suite #4

Workflow file for this run

name: CI
on:
push:
branches: ["main"]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov
pip install -r requirements.txt
pip install -e .
- name: Run tests with coverage
run: |
python -m pytest tests/ --cov=src/feafea --cov-report=xml --cov-report=html --cov-report=term-missing
- name: Upload coverage reports to Codecov
if: matrix.python-version == '3.10'
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
fail_ci_if_error: false
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
- name: Run Ruff
run: ruff check .