-
Notifications
You must be signed in to change notification settings - Fork 3k
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 #7954 from pradyunsg/simplify-linting-github-action
Simplify our Linting GitHub Action
- Loading branch information
Showing
2 changed files
with
54 additions
and
97 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,54 @@ | ||
name: Linting | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
# Run every Friday at 18:02 UTC | ||
- cron: 2 18 * * 5 | ||
|
||
jobs: | ||
lint: | ||
name: ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }}-latest | ||
env: | ||
TOXENV: lint,docs,vendoring | ||
|
||
strategy: | ||
matrix: | ||
os: | ||
- Ubuntu | ||
- Windows | ||
- MacOS | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
|
||
# Setup Caching | ||
- name: pip cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('tools/requirements/tests.txt') }}-${{ hashFiles('tools/requirements/docs.txt') }}-${{ hashFiles('tox.ini') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
${{ runner.os }}- | ||
- name: Set PY (for pre-commit cache) | ||
run: echo "::set-env name=PY::$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')" | ||
- name: pre-commit cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pre-commit | ||
key: pre-commit|2020-02-14|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} | ||
|
||
# Get the latest tox | ||
- name: Install tox | ||
run: python -m pip install tox | ||
|
||
# Main check | ||
- run: python -m tox |
This file was deleted.
Oops, something went wrong.