Skip to content

Commit

Permalink
Simplify linting setup
Browse files Browse the repository at this point in the history
  • Loading branch information
pradyunsg committed Nov 23, 2021
1 parent 3f86c97 commit 1f5bcc9
Showing 1 changed file with 3 additions and 43 deletions.
46 changes: 3 additions & 43 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,50 +8,10 @@ env:
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Set up Node/yarn
uses: actions/setup-node@v1
with:
node-version: "16.x"

- name: Cache python wheels
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: |
${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py', 'docs/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-
- name: Cache node_modules
uses: actions/cache@v2
with:
path: "node_modules"
key: |
${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade pre-commit
python -m pip install -e .
yarn --frozen-lockfile
- name: Lint
run: |
pre-commit run --all-files
- uses: actions/setup-python@v2
- uses: pre-commit/[email protected]

# Build docs on a number of Python versions. In the future this can be
# where tests go.
Expand Down Expand Up @@ -211,7 +171,7 @@ jobs:
if: always()

publish:
name: Publish to PyPi
name: Publish to PyPI
needs: [lint, tests]
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
runs-on: ubuntu-latest
Expand Down

0 comments on commit 1f5bcc9

Please sign in to comment.