Skip to content

Commit

Permalink
Added testspace
Browse files Browse the repository at this point in the history
Co-authored-by: Sourabh Mehta <[email protected]>
  • Loading branch information
grasci-arm and soumeh01 authored Aug 9, 2023
1 parent 0f66cb4 commit fb436ec
Show file tree
Hide file tree
Showing 5 changed files with 181 additions and 15 deletions.
42 changes: 39 additions & 3 deletions .github/workflows/buildmgr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,12 @@ jobs:
with:
submodules: true

- name: Testspace client install & config
if: ${{ !github.event.repository.private }}
uses: testspace-com/setup-testspace@v1
with:
domain: ${{github.repository_owner}}

- name: Cache ARM GCC
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -440,11 +446,21 @@ jobs:
retention-days: ${{ needs.setup.outputs.retention_days }}
if-no-files-found: error

- name: Testspace push unit test content
if: ${{ always() && (matrix.arch != 'arm64') && (!github.event.repository.private) }}
run: |
testspace "[${{ github.workflow }} / Test Report/ ${{ matrix.target }}-${{ matrix.arch }}]./build/test_reports/cbuildunittests-*.xml"
- name: Testspace push integration test content
if: ${{ (!github.event.repository.private) && always() && ((matrix.arch == 'amd64') || (startsWith(matrix.runs_on, 'ubuntu'))) }}
run: |
testspace "[${{ github.workflow }} / Test Report/ ${{ matrix.target }}-${{ matrix.arch }}]./build/test_reports/cbuildintegtests-*.xml"
coverage:
if: |
(github.event_name == 'pull_request') ||
((github.event_name == 'pull_request') ||
(github.event_name == 'push') ||
(github.event_name == 'release' && startsWith(github.ref, 'refs/tags/tools/buildmgr/')) ||
(github.event_name == 'release' && startsWith(github.ref, 'refs/tags/tools/buildmgr/'))) &&
((github.event.schedule != '') && (!github.event.repository.private))
env:
installer_name: "gcc-arm-11.2-2022.02-x86_64-arm-none-eabi.tar.xz"
Expand Down Expand Up @@ -472,6 +488,11 @@ jobs:
with:
submodules: recursive

- name: Testspace client install & config
uses: testspace-com/setup-testspace@v1
with:
domain: ${{github.repository_owner}}

- name: Create build folder
run: mkdir build

Expand Down Expand Up @@ -542,8 +563,23 @@ jobs:
genhtml coverage_buildmgr.info --output-directory coverage_buildmgr --branch-coverage
working-directory: ./build/tools/buildmgr

# testspace changes start
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install lcov_cobertura
- name: Convert to xml
run: |
lcov_cobertura ./build/tools/buildmgr/coverage_buildmgr.info
- name: Testspace push coverage
run: testspace "[${{ github.workflow }} / Code Coverage]./coverage.xml"
# testspace changes end

- name: Upload Report to Codecov
if: ${{ !github.event.repository.private }}
uses: Wandalen/[email protected]
with:
action: codecov/codecov-action@v3
Expand Down
39 changes: 36 additions & 3 deletions .github/workflows/packchk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ jobs:
with:
submodules: recursive

- name: Testspace client install & config
if: ${{ !github.event.repository.private }}
uses: testspace-com/setup-testspace@v1
with:
domain: ${{github.repository_owner}}

# https://github.com/Open-CMSIS-Pack/devtools-build-action
- name: Build PackChkUnitTests
uses: Open-CMSIS-Pack/devtools-build-action@arm64
Expand Down Expand Up @@ -150,11 +156,17 @@ jobs:
if-no-files-found: error
retention-days: ${{ needs.setup.outputs.retention_days }}

- name: Testspace push test content
if: ${{ (!github.event.repository.private) && always() && (matrix.arch != 'arm64') }}
run: |
testspace "[${{ github.workflow }} / Test Report/ ${{ matrix.target }}-${{ matrix.arch }}]./build/test_reports/packchkunittests-*.xml"
testspace "[${{ github.workflow }} / Test Report/ ${{ matrix.target }}-${{ matrix.arch }}]./build/test_reports/packchkintegtests-*.xml"
coverage:
if: |
(github.event_name == 'pull_request') ||
((github.event_name == 'pull_request') ||
(github.event_name == 'push') ||
(github.event_name == 'release' && startsWith(github.ref, 'refs/tags/tools/packchk/')) ||
(github.event_name == 'release' && startsWith(github.ref, 'refs/tags/tools/packchk/'))) &&
((github.event.schedule != '') && (!github.event.repository.private))
env:
lcov_base: https://github.com/linux-test-project/lcov/releases/download/v1.15/
Expand All @@ -173,6 +185,11 @@ jobs:
with:
submodules: recursive

- name: Testspace client install & config
uses: testspace-com/setup-testspace@v1
with:
domain: ${{github.repository_owner}}

# https://github.com/Open-CMSIS-Pack/devtools-build-action
- name: Build PackChkUnitTests
uses: Open-CMSIS-Pack/devtools-build-action@arm64
Expand Down Expand Up @@ -236,8 +253,24 @@ jobs:
genhtml coverage_packchk.info --output-directory coverage_packchk --branch-coverage
working-directory: ./build/tools/packchk

# testspace changes start
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install lcov_cobertura
- name: Convert to xml
run: |
lcov_cobertura ./build/tools/packchk/coverage_packchk.info
- name: Testspace push coverage
run: |
testspace "[${{ github.workflow }} / Code Coverage]./coverage.xml"
# testspace changes start

- name: Upload Report to Codecov
if: ${{ !github.event.repository.private }}
uses: Wandalen/[email protected]
with:
action: codecov/codecov-action@v3
Expand Down
38 changes: 35 additions & 3 deletions .github/workflows/packgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ jobs:
with:
submodules: true

- name: Testspace client install & config
if: ${{ !github.event.repository.private }}
uses: testspace-com/setup-testspace@v1
with:
domain: ${{github.repository_owner}}

# https://github.com/Open-CMSIS-Pack/devtools-build-action
- name: Build PackGenUnitTests
uses: Open-CMSIS-Pack/devtools-build-action@arm64
Expand All @@ -181,11 +187,16 @@ jobs:
retention-days: ${{ needs.setup.outputs.retention_days }}
if-no-files-found: error

- name: Testspace push test content
if: ${{ (!github.event.repository.private) && always() && (matrix.arch != 'arm64') }}
run: |
testspace "[${{ github.workflow }} / Test Report/ ${{ matrix.target }}-${{ matrix.arch }}]./build/test_reports/packgenunittests-*.xml"
coverage:
if: |
(github.event_name == 'pull_request') ||
((github.event_name == 'pull_request') ||
(github.event_name == 'push') ||
(github.event_name == 'release' && startsWith(github.ref, 'refs/tags/tools/packgen/')) ||
(github.event_name == 'release' && startsWith(github.ref, 'refs/tags/tools/packgen/'))) &&
((github.event.schedule != '') && (!github.event.repository.private))
env:
lcov_base: https://github.com/linux-test-project/lcov/releases/download/v1.15/
Expand All @@ -204,6 +215,11 @@ jobs:
with:
submodules: true

- name: Testspace client install & config
uses: testspace-com/setup-testspace@v1
with:
domain: ${{github.repository_owner}}

# https://github.com/Open-CMSIS-Pack/devtools-build-action
- name: Build PackGenUnitTests
uses: Open-CMSIS-Pack/devtools-build-action@arm64
Expand Down Expand Up @@ -248,8 +264,24 @@ jobs:
genhtml coverage_packgen.info --output-directory coverage_packgen --branch-coverage
working-directory: ./build/tools/packgen/

# testspace changes start
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install lcov_cobertura
- name: Convert to xml
run: |
lcov_cobertura ./build/tools/packgen/coverage_packgen.info
- name: Testspace push coverage
run: |
testspace "[${{ github.workflow }} / Code Coverage]./coverage.xml"
# testspace changes start

- name: Upload Report to Codecov
if: ${{ !github.event.repository.private }}
uses: Wandalen/[email protected]
with:
action: codecov/codecov-action@v3
Expand Down
38 changes: 35 additions & 3 deletions .github/workflows/projmgr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,12 @@ jobs:
with:
submodules: true

- name: Testspace client install & config
if: ${{ !github.event.repository.private }}
uses: testspace-com/setup-testspace@v1
with:
domain: ${{github.repository_owner}}

# https://github.com/Open-CMSIS-Pack/devtools-build-action
- name: Build ProjMgrUnitTests
uses: Open-CMSIS-Pack/devtools-build-action@arm64
Expand Down Expand Up @@ -330,11 +336,16 @@ jobs:
retention-days: ${{ needs.setup.outputs.retention_days }}
if-no-files-found: error

- name: Testspace push test content
if: ${{ (!github.event.repository.private) && always() && (matrix.arch != 'arm64') }}
run: |
testspace "[${{ github.workflow }} / Test Report/ ${{ matrix.target }}-${{ matrix.arch }}]./build/test_reports/projmgrunittests-*.xml"
coverage:
if: |
(github.event_name == 'pull_request') ||
((github.event_name == 'pull_request') ||
(github.event_name == 'push') ||
(github.event_name == 'release' && startsWith(github.ref, 'refs/tags/tools/projmgr/')) ||
(github.event_name == 'release' && startsWith(github.ref, 'refs/tags/tools/projmgr/'))) &&
((github.event.schedule != '') && (!github.event.repository.private))
env:
lcov_base: https://github.com/linux-test-project/lcov/releases/download/v1.15/
Expand All @@ -353,6 +364,11 @@ jobs:
with:
submodules: true

- name: Testspace client install & config
uses: testspace-com/setup-testspace@v1
with:
domain: ${{github.repository_owner}}

# https://github.com/Open-CMSIS-Pack/devtools-build-action
- name: Build ProjMgrUnitTests
uses: Open-CMSIS-Pack/devtools-build-action@arm64
Expand Down Expand Up @@ -397,8 +413,24 @@ jobs:
genhtml coverage_projmgr.info --output-directory coverage_projmgr --branch-coverage
working-directory: ./build/tools/projmgr/

# testspace changes start
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install lcov_cobertura
- name: Convert to xml
run: |
lcov_cobertura ./build/tools/projmgr/coverage_projmgr.info
- name: Testspace push coverage
run: |
testspace "[${{ github.workflow }} / Code Coverage]./coverage.xml"
# testspace changes start

- name: Upload Report to Codecov
if: ${{ !github.event.repository.private }}
uses: Wandalen/[email protected]
with:
action: codecov/codecov-action@v3
Expand Down
39 changes: 36 additions & 3 deletions .github/workflows/svdconv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ jobs:
with:
submodules: recursive

- name: Testspace client install & config
if: ${{ !github.event.repository.private }}
uses: testspace-com/setup-testspace@v1
with:
domain: ${{github.repository_owner}}

# https://github.com/Open-CMSIS-Pack/devtools-build-action
- name: Build SVDConvUnitTests
uses: Open-CMSIS-Pack/devtools-build-action@arm64
Expand Down Expand Up @@ -139,11 +145,17 @@ jobs:
if-no-files-found: error
retention-days: ${{ needs.setup.outputs.retention_days }}

- name: Testspace push unit test content
if: ${{ (!github.event.repository.private) && always() && (matrix.arch != 'arm64') }}
run: |
testspace "[${{ github.workflow }} / Test Report/ ${{ matrix.target }}-${{ matrix.arch }}]./build/test_reports/svdconvunittests-*.xml"
testspace "[${{ github.workflow }} / Test Report/ ${{ matrix.target }}-${{ matrix.arch }}]./build/test_reports/svdconvintegtests-*.xml"
coverage:
if: |
(github.event_name == 'pull_request') ||
((github.event_name == 'pull_request') ||
(github.event_name == 'push') ||
(github.event_name == 'release' && startsWith(github.ref, 'refs/tags/tools/svdconv/')) ||
(github.event_name == 'release' && startsWith(github.ref, 'refs/tags/tools/svdconv/'))) &&
((github.event.schedule != '') && (!github.event.repository.private))
env:
lcov_base: https://github.com/linux-test-project/lcov/releases/download/v1.15/
Expand All @@ -162,6 +174,11 @@ jobs:
with:
submodules: recursive

- name: Testspace client install & config
uses: testspace-com/setup-testspace@v1
with:
domain: ${{github.repository_owner}}

# https://github.com/Open-CMSIS-Pack/devtools-build-action
- name: Build SVDConvUnitTests
uses: Open-CMSIS-Pack/devtools-build-action@arm64
Expand Down Expand Up @@ -232,8 +249,24 @@ jobs:
genhtml coverage_svdconv.info --output-directory coverage_svdconv --branch-coverage
working-directory: ./build/tools/svdconv

# testspace changes start
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install lcov_cobertura
- name: Convert to xml
run: |
lcov_cobertura ./build/tools/svdconv/coverage_svdconv.info
- name: Testspace push coverage
run: |
testspace "[${{ github.workflow }} / Code Coverage]./coverage.xml"
# testspace changes start

- name: Upload Report to Codecov
if: ${{ !github.event.repository.private }}
uses: Wandalen/[email protected]
with:
action: codecov/codecov-action@v3
Expand Down

0 comments on commit fb436ec

Please sign in to comment.