Skip to content

Commit

Permalink
enable python 3.8-3.13 in github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
goldmermaid committed Jan 7, 2024
1 parent a9dbb17 commit 1007e3c
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,41 @@ permissions:

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
pip install black
pip install isort
pip install flake8 black isort
python -m pip install poetry
poetry install --no-root # This will install the project dependencies defined in pyproject.toml
- 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: Format code with Black
run: |
black . --line-length=127 --exclude=""
- name: Sort imports with isort
run: |
isort . --line-length=127 --profile=black
- name: Test with unittest
run: |
poetry run python -m unittest discover

0 comments on commit 1007e3c

Please sign in to comment.