Skip to content

Commit

Permalink
Modify .github/workflows/python-package.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rec committed Jan 4, 2024
1 parent 188b0cb commit c84cc66
Showing 1 changed file with 24 additions and 18 deletions.
42 changes: 24 additions & 18 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,36 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Activate venv
run: |
source $VENV
- name: cache poetry install
uses: actions/cache@v2
with:
path: ~/.local
key: poetry-1.7.1-0

- name: Install dependencies
run: |
poetry install
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.7.1
virtualenvs-create: true
virtualenvs-in-project: true

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

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

- name: ruff
run: |
ruff check editor test_editor.py
- run: poetry install --no-interaction

- name: pytest
run: |
pytest
- run: poetry run mypy editor
- run: poetry run ruff check editor test_editor.py
- run: poetry run pytest

0 comments on commit c84cc66

Please sign in to comment.