Skip to content

Commit

Permalink
add cache
Browse files Browse the repository at this point in the history
  • Loading branch information
matjam committed Jan 12, 2024
1 parent c52c9be commit 794d92f
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Python package

on:
pull_request:
types: [opened, synchronize, reopened]
types: [opened, synchronize, reopened, edited, ready_for_review]
push:
branches: [master]

Expand All @@ -12,20 +12,33 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
cache: "pip"

# this caches the entire python installation, including all packages, so that we don't have to reinstall them every time
# we run this action. This is a huge time saver.
- uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements.txt') }}

- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -e .[dev]
- name: Lint with pylint
run: pylint --disable=C0115,C0116,C0104,C0114,W0511 src tests

- name: Check with flake8
run: flake8

- name: Check import sorting
run: isort --check-only -p savage -p tests .

- name: Check black formatting
run: black --check --exclude=$(VENV_DIR) --line-length=100 .

0 comments on commit 794d92f

Please sign in to comment.