Skip to content

Commit

Permalink
ci(docs,tests): Try poetry cache with setup-python@v4
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Aug 16, 2022
1 parent 7521a35 commit 1fbdf49
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
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

0 comments on commit 1fbdf49

Please sign in to comment.