File tree Expand file tree Collapse file tree 4 files changed +7
-38
lines changed
actions/setup-python-poetry Expand file tree Collapse file tree 4 files changed +7
-38
lines changed Original file line number Diff line number Diff line change @@ -41,32 +41,24 @@ runs:
4141 - name : Set virtual environment path
4242 id : venv-path
4343 shell : bash
44- env :
45- VENV : .venv/bin/activate
4644 run : |
47- echo "venv-path=.venv " >> "$GITHUB_OUTPUT"
48- echo "venv-activate=.venv /bin/activate" >> "$GITHUB_OUTPUT"
45+ echo "venv-path=$(poetry env info -p) " >> "$GITHUB_OUTPUT"
46+ echo "venv-activate=$(poetry env info -p) /bin/activate" >> "$GITHUB_OUTPUT"
4947
5048 - name : Cache virtual environment
5149 id : cache-venv
5250 uses : actions/cache@v3
53- if : steps.venv-path.outputs.venv-path != ''
5451 with :
55- path : .venv
52+ path : ${{ steps .venv-path.outputs.venv-path }}
5653 key : ${{ inputs.cache-key-prefix }}-${{ runner.os }}-venv-${{ inputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
5754 restore-keys : |
5855 ${{ inputs.cache-key-prefix }}-${{ runner.os }}-venv-${{ inputs.python-version }}-
5956
6057 - name : Install dependencies
6158 if : steps.cache-venv.outputs.cache-hit != 'true'
6259 shell : bash
63- env :
64- PYTHON_VERSION : ${{ inputs.python-version }}
6560 run : |
66- python -m pip install --upgrade pip
67- python -m pip install poetry
68- poetry config virtualenvs.in-project true
69- poetry install --no-interaction --with dev
61+ poetry install --no-interaction --no-root --with dev
7062
7163 - name : Sanity check
7264 shell : bash
Original file line number Diff line number Diff line change @@ -19,19 +19,11 @@ jobs:
1919 id : extract_repo_name
2020 run : echo "REPO_NAME=$(echo ${{ github.repository }} | cut -d'/' -f2)" >> $GITHUB_ENV
2121
22- - name : Activate virtual environment
23- run : |
24- source .venv/bin/activate
25- python -m pip install --upgrade pip
26- python -m pip install pytest pytest-cov exceptiongroup
27-
2822 - name : Run tests
2923 env :
3024 REPO_NAME : ${{ env.REPO_NAME }}
31- PYTHONPATH : ${{ github.workspace }}
3225 run : |
33- source .venv/bin/activate
34- python -m pytest --cov-branch --cov-report=xml --cov=${{ env.REPO_NAME }}
26+ poetry run pytest --cov-branch --cov-report=xml --cov=${{ env.REPO_NAME }}
3527 ls -lah
3628
3729 - name : Upload coverage reports to Codecov
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ classifiers = [
2222 " Operating System :: OS Independent" ,
2323]
2424urls = { "Homepage" = " https://github.com/arthur-debert/dotcat" }
25- dependencies = [" pyyaml>=6.0.2" , " exceptiongroup>=1.1.0 " ]
25+ dependencies = [" pyyaml>=6.0.2" ]
2626
2727[project .optional-dependencies ]
2828dev = [
You can’t perform that action at this time.
0 commit comments