-
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.
Make .freeze() return self, for easier exporting/rebinding (#2)
* .freeze() returns self. * Test failing type checks * Github Actions: Cache all the things!
- Loading branch information
Showing
9 changed files
with
106 additions
and
30 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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Get (possibly cached) Project/Pre-commit virtualenvs | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up Python | ||
id: setup-python | ||
uses: actions/setup-python@v5 | ||
|
||
- name: Install Poetry | ||
shell: bash | ||
run: | | ||
python -m pip install -qqq poetry | ||
- name: Load cached Poetry virtualenv, if available | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/pypoetry/virtualenvs | ||
key: venv-${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ hashFiles('.github/actions/poetry_cached/action.yml') }}-${{ steps.setup-python.outputs.python-version }} | ||
|
||
- name: Load cached pre-commit virtualenv | ||
id: cached-pre-commit | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/pre-commit | ||
key: pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }}-${{ hashFiles('.github/actions/poetry_cached/action.yml') }}-${{ steps.setup-python.outputs.python-version }} | ||
|
||
- name: Install poetry dependencies, only if cache wasn't found | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
shell: bash | ||
run: | | ||
poetry install --no-interaction | ||
- name: Install pre-commit hooks, only if cache wasn't found | ||
if: steps.cached-pre-commit.outputs.cache-hit != 'true' | ||
shell: bash | ||
run: | | ||
poetry run pre-commit install-hooks |
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,27 @@ | ||
name: Lints and Checks | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main, "*" ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
lints_and_checks: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get (possibly cached) Project/Pre-commit virtualenvs | ||
uses: ./.github/actions/poetry_cached | ||
|
||
- name: Static type checking with `mypy` | ||
run: | | ||
poetry run mypy | ||
- name: Linting with `pre-commit` and `ruff` | ||
run: | | ||
poetry run pre-commit run --all-files --show-diff-on-failure |
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