Skip to content

Commit

Permalink
ensure poetry is installed during github workflow execution and cache…
Browse files Browse the repository at this point in the history
… is enabled
  • Loading branch information
panc86 committed Mar 28, 2024
1 parent 65e4366 commit 4a69ff7
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,23 @@ jobs:
python-version: ["3.10"]

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

- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
- name: Install poetry
uses: abatilo/actions-poetry@v2
- name: Setup a local virtual environment (if no poetry.toml file)
run: |
curl -sSL https://install.python-poetry.org | POETRY_VIRTUALENVS_IN_PROJECT=true python3 - && \
poetry install --no-cache --compile --only main
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- uses: actions/cache@v3
name: Define a cache for the virtual environment based on the dependencies lock file
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install the project dependencies
run: poetry install
# files in data do not change unless
# repo URL is updated and new file is downloaded
- name: Cache Polygons
Expand All @@ -36,7 +42,7 @@ jobs:
- name: Build gazetteer
run: |
mkdir -p ./data
python build.py
poetry run python -B build.py
- name: Changelog
uses: scottbrenner/generate-changelog-action@master
id: Changelog
Expand Down

0 comments on commit 4a69ff7

Please sign in to comment.