Skip to content

Commit

Permalink
Update run_unittests.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbeale-IL authored Oct 2, 2024
1 parent ac58565 commit 4ad496a
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions .github/workflows/run_unittests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,28 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: "3.12"
- name: Poetry setup
# You may pin to the exact commit or the version.
uses: ClementWalter/poetry-action@845abd0cfcc6671c045a2f9df189360bb73e64c4
- name: Install Poetry
run: |
python -m pip install --upgrade pip
python -m pip install poetry
poetry config virtualenvs.create true
poetry config virtualenvs.in-project false
poetry config virtualenvs.path .virtualenvs
- name: Poetry Version
id: poetry-version
run: echo "::set-output name=version::$(poetry --version | grep -oP '[\d\.]+')"
- name: Cache Poetry virtualenv
uses: actions/cache@v2
id: cache
with:
os: "ubuntu-latest"
python-version: "3.12"

path: .virtualenvs
key: ${{ inputs.os }}-${{ inputs.python-version }}-poetry-${{ steps.poetry-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ inputs.os }}-${{ inputs.python-version }}-poetry-${{ steps.poetry-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: |
poetry install
if: steps.cache.outputs.cache-hit != 'true'
- name: Test with pytest
run: |
pytest

0 comments on commit 4ad496a

Please sign in to comment.