Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache poetry #394

Merged
merged 2 commits into from Aug 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 3 additions & 9 deletions .github/workflows/docs.yml
Expand Up @@ -34,14 +34,10 @@ jobs:
run: echo "PUBLISH=$(echo true)" >> $GITHUB_ENV

- name: Install poetry
run: |
curl -O -sSL https://install.python-poetry.org/install-poetry.py
python install-poetry.py -y --version 1.1.14
echo "PATH=${HOME}/.poetry/bin:${PATH}" >> $GITHUB_ENV
rm install-poetry.py
run: pipx install "poetry==1.1.14"

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
Expand All @@ -50,9 +46,7 @@ jobs:
run: echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Install dependencies [w/ docs]
run: |
poetry env use ${{ matrix.python-version }}
poetry install --extras "docs lint"
run: poetry install --extras "docs lint"

- name: Build documentation
run: |
Expand Down
13 changes: 3 additions & 10 deletions .github/workflows/tests.yml
Expand Up @@ -20,23 +20,16 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: |
curl -O -sSL https://install.python-poetry.org/install-poetry.py
python install-poetry.py -y --version 1.1.14
echo "PATH=${HOME}/.poetry/bin:${PATH}" >> $GITHUB_ENV
rm install-poetry.py
run: pipx install "poetry==1.1.14"

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'

- name: Install dependencies
run: |
# This is required to do as of @actions/checkout@v3 to prevent default python from being used
poetry env use ${{ matrix.python-version }}
poetry install -E "docs test coverage lint format"
run: poetry install -E "docs test coverage lint format"

- name: Lint with flake8
run: poetry run flake8
Expand Down
2 changes: 1 addition & 1 deletion .python-version
@@ -1 +1 @@
3.10.5 3.9.13
3.10.6 3.9.13
2 changes: 1 addition & 1 deletion .tool-versions
@@ -1,2 +1,2 @@
poetry 1.1.14
python 3.10.5 3.9.13
python 3.10.6 3.9.13