diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 633a2e8..c593bf4 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -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