Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d472b8e

Browse files
committed
Update build.yml
1 parent 855a8c1 commit d472b8e

File tree

1 file changed

+10
-24
lines changed

1 file changed

+10
-24
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ jobs:
3131
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
3232

3333
steps:
34-
- name: Update network connectivity
35-
run: |
36-
sudo ethtool -K eth0 tx off rx off
37-
sudo apt install bubblewrap
38-
3934
- name: Checkout code
4035
uses: actions/checkout@v3
4136

@@ -44,27 +39,26 @@ jobs:
4439
with:
4540
python-version: "${{ matrix.python-version }}"
4641

47-
- name: Install dependencies and create virtual environment
42+
- name: Install dependencies
4843
run: |
49-
python3 -m pip install --user --upgrade pip
50-
python3 -m pip install --user virtualenv
51-
python3 -m venv env
52-
ls -lha
44+
sudo ethtool -K eth0 tx off rx off
45+
sudo apt install bubblewrap
46+
pip install --user --upgrade pip
47+
pip install --user pipenv
48+
cd env && ls -lha
5349
54-
- name: Run tests in isolated virtual environment
50+
- name: Run tests
5551
run: |
56-
source env/bin/activate
57-
if [ -f requirements.txt ]; then python3 -m pip install -r requirements.txt; fi
58-
if [ -f requirements-dev.txt ]; then python3 -m pip install -r requirements.txt-dev; fi
59-
python3 -m pip install--upgrade pip
52+
if [ -f requirements.txt ]; then pipenv install -r requirements.txt; fi
53+
if [ -f requirements-dev.txt ]; then pipenv install -r requirements.txt-dev; fi
6054
which python3
6155
bwrap \
6256
--ro-bind / / \
6357
--bind $PWD $PWD \
6458
--unshare-all \
6559
--clearenv \
6660
--setenv EXAMPLE VALUE \
67-
python3 -m coverage run -m unittest
61+
pipenv run coverage run -m unittest
6862
deactivate
6963
7064
- name: Run linting
@@ -73,14 +67,6 @@ jobs:
7367
- if: ${{ matrix.python-version == '3.10' }}
7468
name: Upload coverage
7569
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # [email protected]
76-
with:
77-
directory: ./coverage/reports/
78-
env_vars: OS,PYTHON
79-
fail_ci_if_error: true
80-
files: ./coverage.xml
81-
flags: unittests
82-
name: codecov-umbrella
83-
verbose: true
8470

8571
- if: ${{ matrix.python-version == '3.10' }}
8672
name: Build documentation

0 commit comments

Comments
 (0)