Skip to content

Commit 8b855b9

Browse files
committed
CI ughhh
1 parent f4b29dd commit 8b855b9

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

.github/workflows/coverage.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,16 @@ jobs:
3232
- name: Create virtualenv
3333
run: |
3434
pdm python install ${{ matrix.python-version }}
35-
- name: Install dependencies
35+
- name: Install dependencies into virtualenv
3636
run: |
3737
pdm install
3838
- name: Activate virtualenv
3939
run: |
40-
. .venv/bin/activate
41-
echo PATH=$PATH >> $GITHUB_ENV
40+
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#setting-an-environment-variable
41+
# https://stackoverflow.com/questions/74668349/how-to-activate-a-virtualenv-in-a-github-action
42+
source .venv/bin/activate
43+
echo "PATH=$PATH" >> "$GITHUB_ENV"
44+
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> "$GITHUB_ENV"
4245
- name: Generate coverage report
4346
run: |
4447
coverage run --source=. -m runtests

.github/workflows/python-package.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,25 @@ jobs:
3030
python -m pip install --upgrade pip
3131
pip install flake8
3232
pip install pdm
33-
- name: Create virtualenv
34-
run: |
35-
pdm python install ${{ matrix.python-version }}
36-
- name: Install dependencies
37-
run: |
38-
pdm install
3933
- name: Lint with flake8
4034
run: |
4135
# stop the build if there are Python syntax errors or undefined names
4236
flake8 . --config=flake8rc --count --select=E9,F63,F7,F82 --show-source --statistics
4337
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
4438
flake8 . --config=flake8rc --count --exit-zero --max-complexity=100 --max-line-length=127 --statistics
39+
- name: Create virtualenv
40+
run: |
41+
pdm python install ${{ matrix.python-version }}
42+
- name: Install dependencies into virtualenv
43+
run: |
44+
pdm install
4545
- name: Activate virtualenv
4646
run: |
47-
. .venv/bin/activate
48-
echo PATH=$PATH >> $GITHUB_ENV
47+
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#setting-an-environment-variable
48+
# https://stackoverflow.com/questions/74668349/how-to-activate-a-virtualenv-in-a-github-action
49+
source .venv/bin/activate
50+
echo "PATH=$PATH" >> "$GITHUB_ENV"
51+
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> "$GITHUB_ENV"
4952
- name: Test with unpythonic.test.fixtures
5053
run: |
5154
python runtests.py

0 commit comments

Comments
 (0)