forked from eclipse-openbsw/openbsw
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (43 loc) · 1.44 KB
/
code-coverage.yml
File metadata and controls
53 lines (43 loc) · 1.44 KB
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
name: Code Coverage
on: [workflow_call, pull_request]
jobs:
build:
runs-on: ubuntu-22.04
permissions:
contents: write
env:
BUILD_TYPE: Debug
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build development Image
id: build-docker-development
uses: docker/build-push-action@v6
with:
context: "{{defaultContext}}:docker/development"
push: false
tags: openbsw-development:local
outputs: type=docker
cache-from: type=gha
cache-to: type=gha,mode=max,ignore-error=true
- name: Run the code_coverage.py inside the docker container
run: >-
DOCKER_UID=$(id -u) DOCKER_GID=$(id -g) DOCKER_HISTORY=/dev/null docker compose run --rm development
python3 .ci/code_coverage.py
- name: Zip code_coverage and coverage_badges
run: |
cd code_coverage
zip -r coverage.zip coverage
zip -r coverage_badges.zip coverage_badges
- name: Upload code coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage
path: code_coverage/coverage.zip
- name: Upload Coverage Badge
uses: actions/upload-artifact@v4
with:
name: coverage_badges
path: code_coverage/coverage_badges.zip