-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: some type-hints fixes and actions imps (#19)
* chore/fix: some type-hints fixes and actions imps * chore: add remaining lint steps (deps install and cache them) * chore: (actions) unignore lockfile for cache imps.
- Loading branch information
Showing
6 changed files
with
884 additions
and
19 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,50 @@ | ||
--- | ||
name: '[CI] test on pull request' | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: [3.8, 3.9] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install poetry | ||
run: | | ||
curl -sSL \ | ||
"https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py" | python | ||
echo "$HOME/.poetry/bin" >> $GITHUB_PATH | ||
- name: Set up cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: .venv | ||
key: venv-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
poetry config virtualenvs.in-project true | ||
poetry install | ||
poetry run pip install -U pip | ||
- name: Run lint | ||
run: | | ||
poetry run black --safe --check src/ | ||
poetry run isort --check src/ | ||
poetry run lint-imports | ||
poetry run flake8 src/ |
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 |
---|---|---|
|
@@ -101,6 +101,3 @@ ENV/ | |
|
||
# ms-vscode | ||
.vscode/ | ||
|
||
# poetry | ||
poetry.lock |
Oops, something went wrong.