Skip to content

Commit

Permalink
Merge pull request #11 from climatepolicyradar/feature/cache-poetry-p…
Browse files Browse the repository at this point in the history
…ackages-in-CI

cache poetry package installs in CI
  • Loading branch information
kdutia authored Oct 3, 2023
2 parents b24daa0 + fef7703 commit dd5a085
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 9 deletions.
2 changes: 1 addition & 1 deletion {{ cookiecutter.repo_name }}/.github/workflows/fixmes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Check code contains no FIXMEs
run: |
Expand Down
16 changes: 12 additions & 4 deletions {{ cookiecutter.repo_name }}/.github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,24 @@ jobs:

steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
- name: Install poetry
run: pipx install poetry==1.3.2

- name: Install python or load from cache with dependencies
uses: actions/setup-python@v4
with:
python-version: "3.9"
cache: "poetry"

- name: Install dependencies
run: |
poetry install
- name: Install dependencies
run: |
python -m pip install "poetry==1.3.2" && poetry install && poetry run pre-commit install
poetry install && poetry run pre-commit install
- name: Run pre-commit checks
run: |
Expand Down
17 changes: 13 additions & 4 deletions {{ cookiecutter.repo_name }}/.github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,25 @@ jobs:

steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
- name: Install poetry
run: pipx install poetry==1.3.2

- name: Install python or load from cache with dependencies
uses: actions/setup-python@v4
with:
python-version: "3.9"
cache: "poetry"

- name: Install dependencies
run: |
poetry install
- name: Install dependencies
run: |
python -m pip install "poetry==1.2.2" && poetry install
poetry install && poetry run pre-commit install
- name: Run test suite
run: |
poetry run python -m pytest \
Expand Down

0 comments on commit dd5a085

Please sign in to comment.