From cc4618d00c947977457b911ebfde6b5b2d3c856a Mon Sep 17 00:00:00 2001 From: Federico Ceratto Date: Fri, 22 Mar 2024 17:56:44 +0100 Subject: [PATCH] Fix CI --- .github/workflows/python-package.yml | 9 +++++---- tox.ini | 12 ++++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 tox.ini diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 14a4e65..5fafa90 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.9", "3.11"] steps: - uses: actions/checkout@v3 @@ -26,8 +26,9 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | + sudo apt-get install tox python -m pip install --upgrade pip - python -m pip install flake8 pytest + python -m pip install flake8 if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Lint with flake8 run: | @@ -35,6 +36,6 @@ jobs: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest + - name: Test with Tox run: | - pytest + tox -e py -v diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..6edb67c --- /dev/null +++ b/tox.ini @@ -0,0 +1,12 @@ +[tox] +envlist = py39 +isolated_build = True + +[testenv] +deps = + pytest + pexpect + pyte +commands = + pytest tests/ +