Skip to content

Commit

Permalink
Update GitHub CI
Browse files Browse the repository at this point in the history
  • Loading branch information
NikAzanov committed Sep 12, 2023
1 parent bfc2aeb commit 120d500
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,29 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
id: install-python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install poetry
run: |
curl -sSL \
"https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py" | python
# Adding `poetry` to `$PATH`:
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
- name: Install Poetry
uses: snok/install-poetry@v1.3.3
with:
version: latest
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

- name: Cache poetry dependencies
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: ${{ runner.os }}-${{ steps.install-python.outputs.python-version }}-${{ github.job }}-poetry-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
run: |
poetry config virtualenvs.in-project true
poetry run pip install -U pip
poetry install
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --only="test"

- name: Run pre-commit hooks
uses: pre-commit/action@v3.0.0
Expand Down

0 comments on commit 120d500

Please sign in to comment.