Skip to content

Adding in CI testing #4

Adding in CI testing

Adding in CI testing #4

Workflow file for this run

name: "Unit tests for DSO"
on:
push:
branches:
- main
paths-ignore:
- "docs/**"
- "*.md"
pull_request:
paths-ignore:
- "docs/**"
- "*.md"
jobs:
unit_tests_linux:
name: "Python ${{ matrix.python-version }}"
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.13"]
env:
# GitHub currently has 4 cores available for Linux runners
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
worker_cores: 4
steps:
- uses: actions/checkout@v4
- name: "Set up Python ${{ matrix.python-version }}"
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install libgit2
run: sudo apt-get install -y libgit2 libgit2dev
- name: "Install DSO"
run: pip install -e '.[dev]'
- name: "Run unit tests"
run: pytest -vv tests -n ${{ env.worker_cores }} --cov=dso --cov-report=xml
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v4
with:
files: ./coverage.xml
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}