Skip to content

Commit

Permalink
Try to fix pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
Orhideous committed Feb 13, 2024
1 parent 30449fa commit ec24428
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,27 +58,30 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: snok/install-poetry@v1.3.4
with:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Create venv cache
id: cache-venv
uses: actions/cache@v4.0.0
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: ${{env.venv-path}}
key: ${{ runner.os }}-${{ matrix.python-version }}-venv-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-venv-
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
poetry install
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root

- name: Run Pytest
run: |
source .venv/bin/activate
poetry run pytest --verbose

0 comments on commit ec24428

Please sign in to comment.