Skip to content

Commit

Permalink
Revert "Streamline cache"
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandines authored Jan 27, 2024
1 parent 45ead60 commit 82dbe43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,18 @@ jobs:
uses: nathandines/calibre-template-functions/.github/workflows/run_in_pyenv.yml@main
with:
run_command: poetry run mypy .
cached: true
linter-ruff:
needs: [python-deps]
uses: nathandines/calibre-template-functions/.github/workflows/run_in_pyenv.yml@main
with:
run_command: poetry run ruff check --output-format=github .
cached: true
formatter-ruff:
needs: [python-deps]
uses: nathandines/calibre-template-functions/.github/workflows/run_in_pyenv.yml@main
with:
run_command: poetry run ruff format --check .
cached: true
tests-pytest:
needs: [python-deps]
uses: nathandines/calibre-template-functions/.github/workflows/run_in_pyenv.yml@main
with:
run_command: poetry run pytest -v --cov=. .
cached: true
11 changes: 2 additions & 9 deletions .github/workflows/run_in_pyenv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,17 @@ on:
required: false
description: Command to run in pyenv
type: string
cached:
required: false
default: false
description: Whether to rely on cached dependencies (i.e. don't run Poetry)
type: boolean

jobs:
pyenv-workflow:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- if: ${{ ! inputs.cached }}
run: pipx install poetry
- run: pipx install poetry
- uses: actions/setup-python@v5
with:
python-version-file: .python-version
cache: poetry
- if: ${{ ! inputs.cached }}
run: poetry install
- run: poetry install
- if: ${{ inputs.run_command != '' }}
run: ${{ inputs.run_command }}

0 comments on commit 82dbe43

Please sign in to comment.