Skip to content

Commit 5a6c25d

Browse files
authored
feat: poetry migration
1 parent 6778aa5 commit 5a6c25d

3 files changed

Lines changed: 626 additions & 12 deletions

File tree

.github/workflows/python-package.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)