-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from pappasam/fix-dev
Lots of upgrades to dev environment
- Loading branch information
Showing
9 changed files
with
819 additions
and
840 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,22 @@ | ||
name: serdelicacy ci | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-18.04 | ||
|
||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
python-version: ['3.8'] | ||
poetry-version: ['1.0.0b7'] | ||
pip-version: ['19.3.1'] | ||
|
||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/checkout@v4 | ||
- name: Setup, Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: x64 | ||
- name: Tox, Python ${{ matrix.python-version }} | ||
- name: Nox, Python ${{ matrix.python-version }} | ||
run: | | ||
# Python | ||
python -m pip install --upgrade pip==${{ matrix.pip-version }} | ||
# Poetry | ||
curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py > get-poetry.py | ||
python get-poetry.py --preview | ||
rm get-poetry.py | ||
source $HOME/.poetry/env | ||
poetry self update --preview ${{ matrix.poetry-version }} | ||
# Tox | ||
pip install tox==3.14.1 | ||
tox -e py | ||
pip install poetry==1.6.1 | ||
poetry install | ||
poetry run nox -s lint | ||
poetry run nox -s typecheck | ||
poetry run nox -s pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
[mypy] | ||
python_version = 3.8 | ||
python_version = 3.11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
"""Configure nox for automated tests.""" | ||
|
||
import nox | ||
|
||
NOX_SESSION = nox.session(python=False) | ||
|
||
|
||
@NOX_SESSION | ||
def fix(session: nox.Session): | ||
"""Fix files inplace.""" | ||
session.run("ruff", "check", "-se", "--fix", ".") | ||
session.run("black", "-q", ".") | ||
session.run("isort", "-q", "--overwrite-in-place", ".") | ||
session.run("docformatter", "--in-place", "--recursive", ".") | ||
|
||
|
||
@NOX_SESSION | ||
def lint(session: nox.Session): | ||
"""Check file formatting that only have to do with formatting.""" | ||
session.run("ruff", "check", ".") | ||
session.run("black", "--check", "--diff", ".") | ||
session.run("isort", "--check", ".") | ||
session.run("docformatter", "--check", "--recursive", ".") | ||
|
||
|
||
@NOX_SESSION | ||
def typecheck(session: nox.Session): | ||
session.run("mypy", "serdelicacy") | ||
|
||
|
||
@NOX_SESSION | ||
def pytest(session: nox.Session): | ||
session.run("pytest", "tests") |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters