diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index f2ca5a9..2108510 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -1,7 +1,7 @@ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions -name: Python package +name: unit tests on: push: @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.8, 3.9, '3.10', 3.11, 3.12] + python-version: ["3.8","3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 @@ -24,14 +24,8 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Lint with flake8 - run: | - # Stop the build if there are any lint errors or warnings - flake8 . --count --show-source --max-line-length=127 --statistics - - name: Run tests - run: | - python tests.py + cache: pip + - name: Install requirements + run: pip install -r requirements.txt + - name: Run tox + run: tox -e py diff --git a/requirements.txt b/requirements.txt index 1ae3ec6..02cff76 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ +tox flake8 \ No newline at end of file