Skip to content

Rename module (cf. nemo_timeseries.py) #297

Rename module (cf. nemo_timeseries.py)

Rename module (cf. nemo_timeseries.py) #297

Workflow file for this run

name: Pytest and coverage
on:
push:
env:
TEST_DATA_REF: https://github.com/valentinaschueller/ece-4-monitoring-test-data/archive/refs/heads/main.zip
TEST_DATA_DOWNLOAD: test-data
jobs:
lint:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
-
name: Install flake8
run: |
python -m pip install flake8
-
name: Lint with flake8
run: |
# Syntax errors or undefined names
flake8 --count --select=E9,F63,F7,F82 --show-source --statistics monitoring/
flake8 --count --select=E9,F63,F7,F82 --show-source --statistics helpers/
flake8 --count --select=E9,F63,F7,F82 --show-source --statistics tests/
# All other stuff
flake8 --exit-zero --count --statistics --exclude=__init__.py --max-line-length=88 monitoring/
flake8 --exit-zero --count --statistics --exclude=__init__.py --max-line-length=88 helpers/
flake8 --exit-zero --count --statistics --exclude=__init__.py --max-line-length=88 tests/
pytest:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
strategy:
matrix:
python-version: [ "3.11", "3.12", "3.13" ]
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{matrix.python-version}}
-
name: Install miniconda
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: latest
environment-file: conda_environment.yml
python-version: ${{matrix.python-version}}
-
name: Install pytest
run: |
python -m pip install pytest
-
name: Install se-t-ece from source
run: |
python -m pip install .
-
name: Print environment info
run: |
conda info
conda list
-
name: Download test data
run: |
mkdir ${TEST_DATA_DOWNLOAD};
wget -O ${TEST_DATA_DOWNLOAD}/test-data.zip ${TEST_DATA_REF};
unzip -q ${TEST_DATA_DOWNLOAD}/test-data.zip -d ${TEST_DATA_DOWNLOAD};
mv ${TEST_DATA_DOWNLOAD}/ece-4-monitoring-test-data-main/ tests/testdata;
-
name: Run pytest
run: |
pytest
coverage:
needs: pytest
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
-
name: Install miniconda
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: latest
environment-file: conda_environment.yml
python-version: "3.12"
-
name: Install se-t-ece from source
run: |
python -m pip install .
-
name: Install pytest, coverage, coveralls
run: |
python -m pip install pytest
python -m pip install coverage
python -m pip install coveralls
-
name: Download test data
run: |
mkdir ${TEST_DATA_DOWNLOAD};
wget -O ${TEST_DATA_DOWNLOAD}/test-data.zip ${TEST_DATA_REF};
unzip -q ${TEST_DATA_DOWNLOAD}/test-data.zip -d ${TEST_DATA_DOWNLOAD};
mv ${TEST_DATA_DOWNLOAD}/ece-4-monitoring-test-data-main/ tests/testdata;
-
name: Run pytest+coverage
run: |
coverage run -m pytest
coverage lcov
-
name: Publish on coveralls.io
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov