File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,16 +22,26 @@ jobs:
2222 uses : actions/setup-python@v2
2323 with :
2424 python-version : ${{ matrix.python-version }}
25-
25+ - name : Install Poetry
26+ uses : snok/install-poetry@v1
27+ with :
28+ virtualenvs-create : true
29+ virtualenvs-in-project : true
30+ installer-parallel : true
31+ - name : Load cached venv
32+ id : cached-poetry-dependencies
33+ uses : actions/cache@v3
34+ with :
35+ path : .venv
36+ key : venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
2637 - name : Install dependencies
27- run : |
28- python -m pip install --upgrade pip
29- python -m pip install pytest pytest-cov poetry
30- poetry install
38+ if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
39+ run : poetry install --no-interaction --no-root
3140
3241 - name : Test with pytest
3342 run : |
34- python3 -m pytest --cov=fastapi_featureflags -v tests/ --disable-warnings
43+ source .venv/bin/activate
44+ pytest --cov=fastapi_featureflags -v tests/ --disable-warnings
3545
3646 - name : CodeCov
3747 run : bash <(curl -s https://codecov.io/bash)
You can’t perform that action at this time.
0 commit comments