Skip to content

Commit

Permalink
Add a lint job to a workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
thombashi committed Oct 24, 2021
1 parent c9e2552 commit b4e4a44
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,46 @@ name: Tests
on: [push, pull_request]

jobs:
lint:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.8']
os: [ubuntu-latest]
timeout-minutes: 20

steps:
- uses: actions/checkout@v2

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install pip
run: python -m pip install --upgrade --disable-pip-version-check "pip>=21.1"

- name: Get pip cache dir
id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"

- name: Cache pip
id: cache-pip
uses: actions/cache@v2
with:
path: |
${{ steps.pip-cache.outputs.dir }}
./.tox
key: ${{ matrix.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.python-version }}-pip-
- name: Install dependencies
run: make setup-ci

- name: Lint
run: make check

unit-test:
runs-on: ${{ matrix.os }}
strategy:
Expand Down

0 comments on commit b4e4a44

Please sign in to comment.