Skip to content

Commit

Permalink
lint cache dependencies, refactored
Browse files Browse the repository at this point in the history
  • Loading branch information
gautamkrishnar authored Oct 30, 2021
1 parent 3ab19e4 commit 2084cd2
Showing 1 changed file with 6 additions and 19 deletions.
25 changes: 6 additions & 19 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,27 @@
name: Lint

on:
push:
branches:
- master
pull_request:
branches:
- '**'

jobs:
lint:
name: Python ${{ matrix.python-version }} - ${{ matrix.os }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version:
- 3.8
os:
- ubuntu-latest

name: Python linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip dependencies
uses: actions/cache@v2
python-version: 3.8
- uses: actions/cache@v2
with:
path: ~/.cache/pip # This path is specific to Ubuntu
# Look to see if there is a cache hit for the corresponding requirements file
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('hub/requirements/*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down

0 comments on commit 2084cd2

Please sign in to comment.