Skip to content

Commit

Permalink
refactor: Use cache to speed up, install in editable mode
Browse files Browse the repository at this point in the history
  • Loading branch information
r-leyshon committed Jun 21, 2024
1 parent b9b394a commit 6208d38
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/python-package-mac.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# This workflow will install Python dependencies, pre-commit checks, run tests and generate Coverage report
# Not caching pip dependencies in this runner to catch breaking changes in unpinned dependencies
# Fixing OS version to avoid breaking OS changes during development stage.
# Will open up OS versions before release.
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
Expand All @@ -26,11 +25,12 @@ jobs:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
cache: 'pip'
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install '.[test]'
pip install -e '.[test]'
- name: Install java
uses: actions/setup-java@v3
with:
Expand All @@ -45,9 +45,13 @@ jobs:
brew info geos
shell: sh
- name: pre-commit
run: |
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit/
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- run: |
pre-commit install
pre-commit run --all-files
pre-commit run --show-diff-on-failure --color=always --all-files
- name: Run Tests and Generate Coverage Report
run: |
coverage run -m pytest
Expand Down

0 comments on commit 6208d38

Please sign in to comment.