Skip to content

Commit

Permalink
Add workflow for tests in GitHub (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
rboghe authored Nov 1, 2024
1 parent 2e5c4ce commit c057409
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Run Tests

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, '3.10', 3.11, 3.12]

steps:
- name: Checkout code
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 with Poetry
run: |
pip install poetry
poetry install
- name: Run Tests with Coverage
if: ${{ matrix.python-version == 3.12 }}
run: |
poetry run coverage run --source ./pydhn -m unittest -b
poetry run coverage report -m
- name: Run Tests
if: ${{ matrix.python-version != 3.12 }}
run: |
poetry run python -m unittest -b
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

setup(
name="pydhn",
version="0.1.2",
version="0.1.3",
description="A library for the simulation of district heating networks.",
url="https://www.github.com/idiap/pydhn",
author="Roberto Boghetti, Giuseppe Peronato",
Expand Down

0 comments on commit c057409

Please sign in to comment.