-
Notifications
You must be signed in to change notification settings - Fork 141
119 lines (99 loc) · 3.52 KB
/
regression_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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# This is a basic workflow that is manually triggered
name: GUIX Regression Test
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
workflow_dispatch:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "linux_job"
run_tests:
permissions:
contents: read
issues: read
checks: write
pull-requests: write
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
submodules: true
- name: Install softwares
run: ./scripts/install.sh
- name: Build GUIX
run: ./scripts/build.sh
- name: Test GUIX
run: ./scripts/test.sh
- name: Publish Test Results
uses: EnricoMi/[email protected]
if: always()
with:
files: |
./test/guix_test/cmake/build/*/*.xml
- name: Upload Test Results
if: success() || failure()
uses: actions/[email protected]
with:
name: test_reports_GUIX
path: |
./test/guix_test/cmake/build/*.txt
./test/guix_test/cmake/build/*/Testing/**/*.xml
./test/guix_test/cmake/build/**/regression/output_files/*.bin
- name: Configure GitHub Pages
uses: actions/[email protected]
- name: Upload GitHub Pages artifact
uses: actions/[email protected]
with:
path: ./test/guix_test/cmake/coverage_report/default_build_coverage
- name: Generate Code Coverage Summary
uses: irongut/[email protected]
with:
filename: ./test/guix_test/cmake/coverage_report/default_build_coverage.xml
format: markdown
badge: true
hide_complexity: true
output: file
- name: Write Code Coverage Summary
run: |
echo "## Coverage Report" >> $GITHUB_STEP_SUMMARY
cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY
- name: Create CheckRun for Code Coverage
if: (github.event_name == 'push') || (github.event.pull_request.head.repo.full_name == github.repository)
uses: LouisBrunner/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Code Coverage
conclusion: ${{ job.status }}
output: |
{"summary":"Coverage Report"}
output_text_description_file: code-coverage-results.md
- name: Add Code Coverage PR Comment
if: (github.event_name == 'push') || (github.event.pull_request.head.repo.full_name == github.repository)
uses: marocchino/sticky-pull-request-comment@v2
with:
append: true
path: code-coverage-results.md
deploy_code_coverage:
runs-on: ubuntu-latest
if: github.event_name == 'push'
needs: run_tests
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- name: Deploy GitHub Pages site
id: deployment
uses: actions/[email protected]
- name: Write Code Coverage Report URL
run: |
echo '[Open Coverage Report](${{ steps.deployment.outputs.page_url }})' >> $GITHUB_STEP_SUMMARY