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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.10.5 3.9.13
3.10.6 3.9.13
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
poetry 1.1.14
python 3.10.5 3.9.13
python 3.10.6 3.9.13