Skip to content

Commit

Permalink
adding github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
maho3 committed Dec 3, 2023
1 parent 90e0eb0 commit 3a29fa2
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/iob-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: iob-tests

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build-linux:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install coverage pytest
- name: Run tests
run: |
echo "Running tests..."
COVERAGE_FILE=.coverage_layers python3 -m coverage run --source=iobs -m pytest tests/test_layers.py
COVERAGE_FILE=.coverage_sims python3 -m coverage run --source=iobs -m pytest tests/test_simulators.py
COVERAGE_FILE=.coverage_models python3 -m coverage run --source=iobs -m pytest tests/test_models.py
shell: bash
- name: Combine results of unit tests
run: |
python -m pip install --upgrade pip
pip install coverage pytest
coverage combine .coverage_layers .coverage_sims .coverage_models
coverage xml
coverage report -m
shell: bash

0 comments on commit 3a29fa2

Please sign in to comment.