-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
44 additions
and
2 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 |
---|---|---|
|
@@ -72,8 +72,8 @@ jobs: | |
. venv/bin/activate | ||
pre-commit install --install-hooks | ||
formatting: | ||
name: Run pre-commit checks | ||
pylint: | ||
name: Run pylint check | ||
runs-on: ubuntu-latest | ||
needs: prepare-base | ||
steps: | ||
|
@@ -114,6 +114,48 @@ jobs: | |
pip install -e . | ||
pre-commit run pylint --all-files | ||
mypy: | ||
name: Run mypy check | ||
runs-on: ubuntu-latest | ||
needs: prepare-base | ||
steps: | ||
- name: Check out code from GitHub | ||
uses: actions/[email protected] | ||
- name: Set up Python ${{ env.DEFAULT_PYTHON }} | ||
id: python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ env.DEFAULT_PYTHON }} | ||
- name: Restore Python virtual environment | ||
id: cache-venv | ||
uses: actions/[email protected] | ||
with: | ||
path: venv | ||
key: | ||
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{ | ||
needs.prepare-base.outputs.python-key }} | ||
- name: Fail job if Python cache restore failed | ||
if: steps.cache-venv.outputs.cache-hit != 'true' | ||
run: | | ||
echo "Failed to restore Python venv from cache" | ||
exit 1 | ||
- name: Restore pre-commit environment | ||
id: cache-precommit | ||
uses: actions/[email protected] | ||
with: | ||
path: ${{ env.PRE_COMMIT_CACHE }} | ||
key: ${{ runner.os }}-${{ needs.prepare-base.outputs.pre-commit-key }} | ||
- name: Fail job if pre-commit cache restore failed | ||
if: steps.cache-precommit.outputs.cache-hit != 'true' | ||
run: | | ||
echo "Failed to restore pre-commit environment from cache" | ||
exit 1 | ||
- name: Run formatting check | ||
run: | | ||
. venv/bin/activate | ||
pip install -e . | ||
pre-commit run mypy --all-files | ||
spelling: | ||
name: Run spelling checks | ||
runs-on: ubuntu-latest | ||
|