Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
evansims committed Aug 14, 2023
1 parent 855a8c1 commit d472b8e
Showing 1 changed file with 10 additions and 24 deletions.
34 changes: 10 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ jobs:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]

steps:
- name: Update network connectivity
run: |
sudo ethtool -K eth0 tx off rx off
sudo apt install bubblewrap
- name: Checkout code
uses: actions/checkout@v3

Expand All @@ -44,27 +39,26 @@ jobs:
with:
python-version: "${{ matrix.python-version }}"

- name: Install dependencies and create virtual environment
- name: Install dependencies
run: |
python3 -m pip install --user --upgrade pip
python3 -m pip install --user virtualenv
python3 -m venv env
ls -lha
sudo ethtool -K eth0 tx off rx off
sudo apt install bubblewrap
pip install --user --upgrade pip
pip install --user pipenv
cd env && ls -lha
- name: Run tests in isolated virtual environment
- name: Run tests
run: |
source env/bin/activate
if [ -f requirements.txt ]; then python3 -m pip install -r requirements.txt; fi
if [ -f requirements-dev.txt ]; then python3 -m pip install -r requirements.txt-dev; fi
python3 -m pip install--upgrade pip
if [ -f requirements.txt ]; then pipenv install -r requirements.txt; fi
if [ -f requirements-dev.txt ]; then pipenv install -r requirements.txt-dev; fi
which python3
bwrap \
--ro-bind / / \
--bind $PWD $PWD \
--unshare-all \
--clearenv \
--setenv EXAMPLE VALUE \
python3 -m coverage run -m unittest
pipenv run coverage run -m unittest
deactivate
- name: Run linting
Expand All @@ -73,14 +67,6 @@ jobs:
- if: ${{ matrix.python-version == '3.10' }}
name: Upload coverage
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # [email protected]
with:
directory: ./coverage/reports/
env_vars: OS,PYTHON
fail_ci_if_error: true
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
verbose: true

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

0 comments on commit d472b8e

Please sign in to comment.