From 3a29fa23468be9310417b5283f867032f7a96953 Mon Sep 17 00:00:00 2001 From: maho3 Date: Sun, 3 Dec 2023 02:01:09 +0100 Subject: [PATCH] adding github workflow --- .github/workflows/iob-tests.yml | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/iob-tests.yml diff --git a/.github/workflows/iob-tests.yml b/.github/workflows/iob-tests.yml new file mode 100644 index 0000000..1a433f3 --- /dev/null +++ b/.github/workflows/iob-tests.yml @@ -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 \ No newline at end of file