forked from oscarpilote/Ortho4XP
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run linter and tests in CI build (#48)
* Run linter and tests in CI build * Fix linter invocation and upgrade its dependency * Parallelize MyPy and Black checks * Try Python 3.10 to see if generics error disappears * Bump actions/setup-python to v4 * Remove poetry cache * Move poetry install to after setup-python * Tweak * Try a poetry env use fix * Try poetry env use one-liner * Tweak * Apply Black formatter * Try without cache: poetry * Set up poetry after python * Try poetry 1.2.0b2 * Reordering * try python 3.9 * alternate poetry install method * Use install-poetry action * Tweak * Just install libgeos-dev * Add libproj-dev * Replicate * Try generics again * Reformat * Add types-requests and types-pillow stubs to satisfy mypy
- Loading branch information
1 parent
c3325eb
commit e6ce041
Showing
15 changed files
with
213 additions
and
217 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,22 +1,71 @@ | ||
name: Test | ||
name: Build | ||
|
||
on: [push, pull_request, workflow_dispatch] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
test: | ||
name: Test | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Poetry | ||
run: pipx install poetry | ||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
cache: poetry | ||
python-version: "3.9" | ||
- name: Install dependencies | ||
run: poetry install | ||
# TODO run tests | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- uses: snok/install-poetry@v1 | ||
- name: Install GEOS | ||
uses: lyricwulf/abc@v1 | ||
with: | ||
macos: geos | ||
linux: libgeos-dev | ||
- name: Install PROJ | ||
uses: lyricwulf/abc@v1 | ||
with: | ||
macos: proj | ||
linux: proj-bin libproj-dev | ||
- run: poetry install | ||
- run: poetry run pytest | ||
black: | ||
name: Black | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- uses: snok/install-poetry@v1 | ||
- name: Install GEOS | ||
uses: lyricwulf/abc@v1 | ||
with: | ||
macos: geos | ||
linux: libgeos-dev | ||
- name: Install PROJ | ||
uses: lyricwulf/abc@v1 | ||
with: | ||
macos: proj | ||
linux: proj-bin libproj-dev | ||
- run: poetry install | ||
- run: poetry run black --check src | ||
mypy: | ||
name: MyPy | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- uses: snok/install-poetry@v1 | ||
- name: Install GEOS | ||
uses: lyricwulf/abc@v1 | ||
with: | ||
macos: geos | ||
linux: libgeos-dev | ||
- name: Install PROJ | ||
uses: lyricwulf/abc@v1 | ||
with: | ||
macos: proj | ||
linux: proj-bin libproj-dev | ||
- run: poetry install | ||
- run: poetry run mypy |
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
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
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
Oops, something went wrong.