diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml new file mode 100644 index 0000000..bd7cd4c --- /dev/null +++ b/.github/workflows/pytest.yml @@ -0,0 +1,36 @@ +name: pytest_main + +on: + push: + branches: [ imp-integration ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: 3.9 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 pytest pytest-cov coverage + pip install -r requirements.txt + + - name: Lint with flake8 + run: | + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + flake8 . --count --exit-zero --max-complexity=15 --exclude=./tests/* --max-line-length=127 --statistics + + - name: Test with pytest + run: | + pytest --cov --cov-branch --cov-report term-missing --cov-append + coverage json \ No newline at end of file