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 c0e3c91 commit e0acd87
Showing 1 changed file with 26 additions and 21 deletions.
47 changes: 26 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,32 +43,37 @@ jobs:
run: |
sudo ethtool -K eth0 tx off rx off
sudo apt install bubblewrap
export PIPENV_DEFAULT_PYTHON_VERSION=${{ matrix.python-version }}
export PIPENV_VENV_IN_PROJECT=1
export PIP_IGNORE_INSTALLED=1
pip install --user --upgrade pip
pip install --user pipenv
pipenv --site-packages
python -m pip install --no-cache-dir --user pip
python -m pip install --no-cache-dir --user pipenv
- name: Run tests
run: |
if [ -f requirements.txt ]; then pipenv install --dev -r requirements.txt; fi
if [ -f requirements-dev.txt ]; then pipenv install --dev -r requirements-dev.txt; fi
bwrap \
--unshare-all \
--clearenv \
--setenv EXAMPLE VALUE \
--ro-bind / / \
--bind ${{ github.workspace }} ${{ github.workspace }} \
--tmpfs $HOME \
--tmpfs /tmp \
--tmpfs /var \
--tmpfs /run --dir /run/user/$(id -u) \
--dev /dev \
--proc /proc \
--die-with-parent \
--new-session \
bash pipenv run coverage run -m unittest
if [ -f requirements.txt ]; then python -m pipenv install --dev -r requirements.txt; fi
if [ -f requirements-dev.txt ]; then python -m pipenv install --dev -r requirements-dev.txt; fi
pipenv --python `python --version | grep -Eo '3\.[0-9]+'` sync --dev
python -m pipenv run coverage run -m unittest
# - name: Run tests
# run: |
# if [ -f requirements.txt ]; then pipenv install --dev -r requirements.txt; fi
# if [ -f requirements-dev.txt ]; then pipenv install --dev -r requirements-dev.txt; fi
# bwrap \
# --unshare-all \
# --clearenv \
# --setenv EXAMPLE VALUE \
# --ro-bind / / \
# --bind ${{ github.workspace }} ${{ github.workspace }} \
# --tmpfs $HOME \
# --tmpfs /tmp \
# --tmpfs /var \
# --tmpfs /run --dir /run/user/$(id -u) \
# --dev /dev \
# --proc /proc \
# --die-with-parent \
# --new-session \
# python -m pipenv run coverage run -m unittest

- name: Run linting
run: pre-commit run --all-files
Expand Down

0 comments on commit e0acd87

Please sign in to comment.