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