diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index bebfcff..f404f73 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -4,47 +4,31 @@ on: [push] jobs: build: + runs-on: ubuntu-latest strategy: matrix: python-version: ['3.9', '3.10', '3.11', '3.12'] steps: - - uses: actions/checkout@v3 - + - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - - - name: Cache pip - uses: actions/cache@v3 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - - - name: Upgrade pip and install build dependencies - run: | - python -m pip install --upgrade pip - python -m pip install "setuptools==69" "wheel" "setuptools_scm[toml]>=6.2" - - name: Install dependencies run: | + python -m pip install --upgrade pip + pip install -r requirements.txt pip install . - - - name: Clean previous build artifacts - run: | - rm -rf build dist *.egg-info - - name: Lint with flake8 run: | pip install flake8 + # stop the build if there are Python syntax errors or undefined names 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 run: | - pip install pytest==6.2.4 - pytest + pip install pytest==8.2.2 + PYTHONPATH=. pytest