Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
i0bs authored Dec 14, 2021
1 parent 736426a commit 63dd9cb
Showing 1 changed file with 14 additions and 26 deletions.
40 changes: 14 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,21 @@
name: pre-commit
jobs:
lint-multi-os:
name: Lint ${{ matrix.os }}
main:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 3.x
- uses: actions/cache@v1
with:
key: v0-${{ runner.os }}-pip-lint-${{ hashFiles('setup.py') }}
path: ~/.cache/pip
restore-keys: |
v0-${{ runner.os }}-pip-lint-
v0-${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[lint]
- name: Run black
run: black --check --verbose .
- name: Run flake8
run: flake8 --exclude docs --statistics
- name: Run isort
run: isort -cv .
- name: Run sphinx
run: sphinx-build -W --keep-going docs/ /tmp/foo
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: pre-commit/[email protected]
- name: Set Python version
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v1
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
strategy:
matrix:
python-version: ["3.9"]
os: [macOS-latest, ubuntu-latest, windows-latest]
name: CI
on: [pull_request, push]

0 comments on commit 63dd9cb

Please sign in to comment.