Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Streamline cache" #10

Merged
merged 1 commit into from
Jan 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}