Skip to content

Commit

Permalink
Fix windows env caching in GH
Browse files Browse the repository at this point in the history
  • Loading branch information
gutzbenj committed Jan 24, 2021
1 parent 2cbae78 commit 1e7043c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,42 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.6", "3.7", "3.8", "3.9"]
defaults:
run:
shell: bash
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
name: Python ${{ matrix.python-version }} on OS ${{ matrix.os }}
steps:
- name: Acquire sources
uses: actions/checkout@v2

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Setup Poetry

- name: Install Poetry
uses: Gr1N/setup-poetry@v4

- name: Configure poetry
# FROM https://github.com/northtree/poetry-github-actions/actions/runs/170795796/workflow
run: |
poetry config virtualenvs.in-project false
poetry config cache-dir ~/.poetry
poetry config virtualenvs.path ~/.poetry/venv
- name: Load cached dependencies
- name: Load cached venv
uses: actions/cache@v2
id: cache
with:
path: ~/.poetry
key: ${{ matrix.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles('poetry.lock') }}

- name: Install library
run: poetry install --extras=http --extras=sql --extras=excel

- name: Test
run: poetry run poe test
run: |
poetry run poe test
12 changes: 6 additions & 6 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1e7043c

Please sign in to comment.