Skip to content

Commit f4b29dd

Browse files
committed
CI: ugh again
1 parent e43d23e commit f4b29dd

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

.github/workflows/coverage.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,24 @@ jobs:
2323
uses: actions/setup-python@v2
2424
with:
2525
python-version: ${{ matrix.python-version }}
26-
- name: Install dependencies
26+
- name: Install tools
2727
run: |
2828
python -m pip install --upgrade pip
2929
pip install flake8
30+
pip install coverage
3031
pip install pdm
32+
- name: Create virtualenv
33+
run: |
3134
pdm python install ${{ matrix.python-version }}
35+
- name: Install dependencies
36+
run: |
3237
pdm install
38+
- name: Activate virtualenv
39+
run: |
40+
. .venv/bin/activate
41+
echo PATH=$PATH >> $GITHUB_ENV
3342
- name: Generate coverage report
3443
run: |
35-
pip install coverage
36-
# For some reason, the install step creates the venv one directory too deep. Maybe doesn't matter.
37-
source /home/runner/work/unpythonic/unpythonic/.venv/bin/activate
3844
coverage run --source=. -m runtests
3945
coverage xml
4046
- name: Upload coverage to Codecov

.github/workflows/python-package.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,27 @@ jobs:
2525
uses: actions/setup-python@v2
2626
with:
2727
python-version: ${{ matrix.python-version }}
28-
- name: Install dependencies
28+
- name: Install tools
2929
run: |
3030
python -m pip install --upgrade pip
3131
pip install flake8
3232
pip install pdm
33+
- name: Create virtualenv
34+
run: |
3335
pdm python install ${{ matrix.python-version }}
36+
- name: Install dependencies
37+
run: |
3438
pdm install
3539
- name: Lint with flake8
3640
run: |
3741
# stop the build if there are Python syntax errors or undefined names
3842
flake8 . --config=flake8rc --count --select=E9,F63,F7,F82 --show-source --statistics
3943
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
4044
flake8 . --config=flake8rc --count --exit-zero --max-complexity=100 --max-line-length=127 --statistics
45+
- name: Activate virtualenv
46+
run: |
47+
. .venv/bin/activate
48+
echo PATH=$PATH >> $GITHUB_ENV
4149
- name: Test with unpythonic.test.fixtures
4250
run: |
43-
# For some reason, the install step creates the venv one directory too deep. Maybe doesn't matter.
44-
source /home/runner/work/unpythonic/unpythonic/.venv/bin/activate
4551
python runtests.py

0 commit comments

Comments
 (0)