Deleted #152
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Guide: https://shrra.github.io/python-intermediate-development/23-continuous-integration-automated-testing/index.html | |
name: Unit test and code coverage | |
# We can specify which Github events will trigger a CI build | |
on: push | |
# now define a single job 'build' (but could define more) | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ["3.10", "3.11", "3.12"] | |
runs-on: ${{ matrix.os }} | |
# a job is a seq of steps | |
steps: | |
# Next we need to checkout out repository, and set up Python | |
# A 'name' is just an optional label shown in the log - helpful to clarify progress - and can be anything | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Python dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
python3 -m pip install -e . | |
python3 -m pip install pytest pytest-cov hypothesis | |
- name: Test with PyTest and generate coverage report | |
run: | | |
python3 -m pytest tests/ --cov=distclassipy --cov-report=xml | |
- name: Upload coverage report to codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: sidchaini/DistClassiPy |