Skip to content

Commit 97bff17

Browse files
committed
CI: maybe this will finally work?
1 parent ada524f commit 97bff17

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

.github/workflows/coverage.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,19 @@ jobs:
2727
run: |
2828
python -m pip install --upgrade pip
2929
pip install flake8
30-
pip install coverage
3130
pip install pdm
32-
- name: Create virtualenv
31+
- name: Create virtualenv and install dependencies
3332
run: |
3433
pdm python install ${{ matrix.python-version }}
3534
# "When you run pdm install the first time on a new PDM-managed project, whose Python interpreter is not decided yet,
3635
# PDM will create a virtualenv in <project_root>/.venv, and install dependencies into it."
3736
# --https://pdm-project.org/en/latest/usage/venv/
3837
pdm install
39-
- name: Activate virtualenv
38+
- name: Install coverage tool in virtualenv
4039
run: |
4140
pdm use --venv in-project
4241
source .venv/bin/activate
43-
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#setting-an-environment-variable
44-
# https://stackoverflow.com/questions/74668349/how-to-activate-a-virtualenv-in-a-github-action
45-
echo "PATH=$PATH" >> "$GITHUB_ENV"
46-
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> "$GITHUB_ENV"
42+
pip install coverage
4743
- name: Generate coverage report
4844
run: |
4945
pdm use --venv in-project

.github/workflows/python-package.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,13 @@ jobs:
3636
flake8 . --config=flake8rc --count --select=E9,F63,F7,F82 --show-source --statistics
3737
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
3838
flake8 . --config=flake8rc --count --exit-zero --max-complexity=100 --max-line-length=127 --statistics
39-
- name: Create virtualenv
39+
- name: Create virtualenv and install dependencies
4040
run: |
4141
pdm python install ${{ matrix.python-version }}
4242
# "When you run pdm install the first time on a new PDM-managed project, whose Python interpreter is not decided yet,
4343
# PDM will create a virtualenv in <project_root>/.venv, and install dependencies into it."
4444
# --https://pdm-project.org/en/latest/usage/venv/
4545
pdm install
46-
- name: Activate virtualenv
47-
run: |
48-
pdm use --venv in-project
49-
source .venv/bin/activate
50-
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#setting-an-environment-variable
51-
# https://stackoverflow.com/questions/74668349/how-to-activate-a-virtualenv-in-a-github-action
52-
echo "PATH=$PATH" >> "$GITHUB_ENV"
53-
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> "$GITHUB_ENV"
5446
- name: Test with unpythonic.test.fixtures
5547
run: |
5648
pdm use --venv in-project

0 commit comments

Comments
 (0)