diff --git a/.coveragerc b/.coveragerc index fa5cdb96..0ed78884 100644 --- a/.coveragerc +++ b/.coveragerc @@ -8,4 +8,5 @@ omit = model_data/app.py model_data/plotting/* recommendations/rdsap_tables.py - model_data/simulation_system/* \ No newline at end of file + model_data/simulation_system/* + model_data/cleaner_app.py \ No newline at end of file diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml new file mode 100644 index 00000000..19a731e6 --- /dev/null +++ b/.github/workflows/unit_tests.yml @@ -0,0 +1,31 @@ +name: Python package + +on: [ push, pull_request ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [ 3.8, 3.9, 3.10 ] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r model_data/requirements/requirements.txt + - name: Run tests with pytest + run: | + pip install -r model_data/requirements/dev.txt + pytest +# - name: Upload coverage to Codecov +# uses: codecov/codecov-action@v2 +# with: +# token: ${{ secrets.CODECOV_TOKEN }} +# fail_ci_if_error: true