Skip to content

Commit

Permalink
chore(ci): enable tests in Docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
git-developer committed Oct 6, 2024
1 parent affc57a commit 532f2e6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ RUN <<EOR
gcc \
git \
librsvg2-bin \
libxfixes3 \
linux-headers-generic \
python3-dev \
python3-setuptools \
python3-usb \
python3-venv \
python-is-python3

Expand Down Expand Up @@ -49,14 +51,16 @@ RUN <<EOR
python -m build --wheel
python -m venv .env
. .env/bin/activate
pip install libusb1 pytest toml vdf
python -m pytest tests
pip install --prefix "${TARGET}/usr" dist/*.whl

# Save version
python -c "from scc.constants import DAEMON_VERSION; print('VERSION=' + DAEMON_VERSION)" >>/build/.build-metadata.env

# Fix shebangs of scripts from '#!/work/.env/bin/python'
find "${TARGET}/usr/bin" -type f | xargs sed -i 's:work/.env:usr:'

# Save version
python -c "from importlib.metadata import version; print('VERSION=' + version('sccontroller'))" >>/build/.build-metadata.env

# Provide input-event-codes.h as fallback for runtime systems without linux headers
cp -a \
"$(find /usr -type f -name input-event-codes.h -print -quit)" \
Expand Down

0 comments on commit 532f2e6

Please sign in to comment.