Show build status of posix & S32k148 #273
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run pytest for posix platform | |
on: [push, pull_request] | |
jobs: | |
run-pytest-on-posix: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install missing kernel module file for vcan | |
run: | | |
sudo apt update | |
sudo apt install linux-modules-extra-$(uname -r) | |
- name: Install can kernel modules | |
run: | | |
sudo modprobe can | |
sudo modprobe can-raw | |
sudo modprobe vcan | |
- name: Set up vcan0 interface | |
run: | | |
sudo ip link add dev vcan0 type vcan | |
sudo ip link set vcan0 mtu 16 | |
sudo ip link set up vcan0 | |
- name: Show all interface info, vcan0 should be set up | |
run: ip a | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Build the docker image | |
run: | | |
docker build -f docker/Dockerfile.dev -t dev . | |
- name: Run the pytest inside the docker container | |
run: | | |
docker run --rm --network=host \ | |
--cap-add=NET_ADMIN --cap-add=SYS_MODULE \ | |
--device /dev/net/tun \ | |
--volume /lib/modules:/lib/modules \ | |
-v "$PWD:/home/jenkins" \ | |
-w /home/jenkins \ | |
--user "$(id -u):4996" \ | |
dev python3 .ci/pytest.py | |