-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.15 KB
/
unit-test.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
name: Unit Tests
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
unit-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker image
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
tags: localtest:latest
push: false
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Run tests
uses: addnab/docker-run-action@v3
with:
image: localtest:latest
run: |
cd /ros2_ws
bash ./src/vortex-m3-sonar-driver/run_and_check_tests.sh
# Look at https://github.com/marketplace/actions/ros-2-ci-action for a less scuffed way to do this.
# This can also be integrated with https://about.codecov.io/ which is nice.