Skip to content

Commit

Permalink
Update python-package.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ymrohit authored Oct 1, 2024
1 parent a300954 commit 807b43c
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/setup.py', '**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
Expand All @@ -34,24 +34,20 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 requests
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
pip install .
- name: Lint with flake8
run: |
# 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: Run unittest tests
- name: Run tests
run: |
python Tests/postcodetest.py
# Alternatively, use unittest discovery:
# python -m unittest discover -s Tests
python -m unittest discover -s Tests
# Optional: Upload Test Reports
# Uncomment if you're generating XML reports
# - name: Upload Test Reports
# if: always()
# uses: actions/upload-artifact@v3
Expand Down

0 comments on commit 807b43c

Please sign in to comment.