-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (49 loc) · 2.03 KB
/
pr-x64.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: PiCar-X PR Build
on:
pull_request:
paths:
- PiCar-X/**
- .github/workflows/pr-*.yml
env:
REGISTRY: ghcr.io
jobs:
build:
runs-on: [self-hosted, Linux, X64]
steps:
- uses: actions/checkout@v4
- name: build core container
working-directory: ./PiCar-X
run: |
TAG=${{ github.sha }} docker compose -f docker-compose-core.yml build --no-cache
- name: build dtp containers without gazebo
working-directory: ./PiCar-X
run: |
TAG=${{ github.sha }} docker compose -f docker-compose-dtp-headless-gazebo.yml build --no-cache
unit-tests:
runs-on: [self-hosted, Linux, X64]
needs: [build]
steps:
- uses: actions/checkout@v4
- name: Run pytest in Docker container
working-directory: ./PiCar-X
run: |
docker run --rm --name picarx-unittest ghcr.io/cau-se/arches-picar-x/picarx:${{ github.sha }} pytest ./src/core/picarx/tests
integration-tests:
runs-on: [self-hosted, Linux, X64]
needs: [unit-tests]
steps:
- uses: actions/checkout@v4
- name: Integration Test dcmotor
working-directory: ./PiCar-X
run: |
docker run --rm --name dcmotor-integration-test -v /sys/class/gpio:/sys/class/gpio -v /dev/i2c-0:/dev/i2c-0 --privileged ghcr.io/cau-se/arches-picar-x/drivers/dcmotor:${{ github.sha }} rostest picarx_dcmotor_driver integration_tests.test i2c_port:=/dev/i2c-0
- name: Speed tests using Gazebo headless
working-directory: ./PiCar-X
run: |
i2c=/dev/i2c-0 docker compose -f docker-compose-dtp-headless-gazebo.yml up -d
docker exec picar-x-picarx-gazebo-control-1 /bin/bash -c "source ./install/setup.bash && sleep 30; python3 ./src/simulation/picarx_control/tests/steering_integration_test.py"
- name: Remove running containers after tests
if: success() || failure()
working-directory: ./PiCar-X
run: |
TAG=${{ github.sha }} docker compose -f docker-compose-dtp-headless-gazebo.yml down