Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reuse github action from ThreadX repo. #77

Merged
merged 2 commits into from
Nov 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 3 additions & 100 deletions .github/workflows/regression_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,104 +15,7 @@ on:
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:
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
uses: azure-rtos/threadx/.github/workflows/regression_template.yml@master
with:
cmake_path: ./test/guix_test/cmake

TiejunMS marked this conversation as resolved.
Show resolved Hide resolved