Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update workflows #127

Merged
merged 11 commits into from
Mar 17, 2024
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: "3.9"

# ADJUST THIS: install all dependencies (including pdoc)
- run: pip install -r requirements.txt
- run: pip install poetry; poetry install
# ADJUST THIS: build your documentation into docs/.
# We use a custom build script for pdoc itself, ideally you just run `pdoc -o docs/ ...` here.
- run: pdoc -o docs --docformat google --logo https://user-images.githubusercontent.com/37182127/233436178-26c2b4be-e630-4f9b-b4c9-d58424bd365d.png todonotifier/
Expand Down
86 changes: 64 additions & 22 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,77 @@ name: Python application

on:
push:
branches: [ "main" ]
branches: ["main", "development"]
pull_request:
branches: [ "main" ]
branches: ["main", "development"]

permissions:
contents: read

jobs:
build:
build3_9:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
pip install poetry
poetry export -f requirements.txt --with dev>> requirements.txt
pip install -r requirements.txt
- name: Lint with flake8
run: |
python -m pip install --upgrade pip
pip install poetry
poetry export -f requirements.txt --with dev >> requirements.txt
pip install -r requirements.txt
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --config ./tox.ini
# 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 --config ./tox.ini
- name: Test with pytest
run: |
python -m pip install --upgrade pip
pip install poetry
poetry export -f requirements.txt --with dev >> requirements.txt
pip install -r requirements.txt
pytest

build3_11:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- 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: Test with pytest
run: |
pytest
- uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry export -f requirements.txt --with dev >> requirements.txt
pip install -r requirements.txt
- name: Lint with flake8
run: |
python -m pip install --upgrade pip
pip install poetry
poetry export -f requirements.txt --with dev >> requirements.txt
pip install -r requirements.txt
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --config ./tox.ini
# 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 --config ./tox.ini
- name: Test with pytest
run: |
python -m pip install --upgrade pip
pip install poetry
poetry export -f requirements.txt --with dev >> requirements.txt
pip install -r requirements.txt
pytest
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@ exclude = '''
| dist
| migrations
| venv
| \.history
)/
'''

[tool.isort]
profile = "black"
skip = ["migrations", ".env", "venv", ".local", ".history", ".vscode"]

[tool.poetry]
name = "todonotifier"
version = "1.3.2"
Expand Down
Loading