Skip to content

Commit

Permalink
udpate github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
nguu0123 committed Jul 3, 2024
1 parent 7780849 commit b4a8ff7
Showing 1 changed file with 31 additions and 8 deletions.
39 changes: 31 additions & 8 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,36 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: 'pip'
- uses: actions/checkout@v4

- run: pip install ".[dev]"
- uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"

- uses: pre-commit/[email protected]
- name: cache poetry install
uses: actions/cache@v4
with:
path: ~/.local
key: poetry-1.8.3-0

- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.3
virtualenvs-create: true
virtualenvs-in-project: true

- name: cache deps
id: cache-deps
uses: actions/cache@v4
with:
path: .venv
key: pydeps-${{ hashFiles('**/poetry.lock') }}

- run: poetry install --no-interaction --no-root
if: steps.cache-deps.outputs.cache-hit != 'true'

- run: poetry install --no-interaction

- uses: pre-commit/[email protected]

0 comments on commit b4a8ff7

Please sign in to comment.