Skip to content

Commit

Permalink
Update setup of python in lint pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
SylteA committed Dec 10, 2023
1 parent 2da53ba commit a7fe554
Showing 1 changed file with 3 additions and 33 deletions.
36 changes: 3 additions & 33 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,40 +22,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Cache Poetry cache
uses: actions/cache@v2
- name: Install Python Dependencies
uses: HassanAbouelela/actions/setup-python@setup-python_v1.4.2
with:
path: |
~/.cache/pypoetry
key: "poetry-cache-${{ runner.os }}-\
${{ env.PYTHON_VERSION }}-${{ env.POETRY_VERSION }}"

- name: Cache Pre-commit cache
uses: actions/cache@v2
with:
path: ~/.cache/pre-commit
key: "pre-commit-cache-${{ runner.os }}-${{ env.PYTHON_VERSION }}-\
${{ env.PRECOMMIT_VERSION }}-\
${{ hashFiles('**/.pre-commit-config.yaml') }}"

# virtualenv cache should depend on OS, Python version and `poetry.lock` (and optionally workflow files).
- name: Cache Packages
uses: actions/cache@v2
with:
path: ~/.local
key: "poetry-${{ runner.os }}-${{ env.PYTHON_VERSION }}-\
${{ hashFiles('**/poetry.lock') }}-\
${{ hashFiles('.github/workflows/*.yaml') }}"

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install dependencies using poetry
run: |
pip install poetry
poetry install --only dev
python_version: ${{ env.PYTHON_VERSION }}

# We will not run `flake8` here, as we will use a separate flake8
# action. As pre-commit does not support user installs, we set
Expand Down

0 comments on commit a7fe554

Please sign in to comment.