Skip to content

Commit

Permalink
Workflow cleanup and removed duplicate steps
Browse files Browse the repository at this point in the history
  • Loading branch information
soumeh01 committed Jul 30, 2023
1 parent 7ac62d4 commit ef3952b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
go-package: ./...

test:
continue-on-error: true
strategy:
matrix:
platform: [ubuntu-latest, windows-latest, macos-latest]
Expand All @@ -81,6 +82,10 @@ jobs:
run: |
mkdir -p build
go test -v ./... > build/cbuildtests-${{ matrix.platform }}-amd64.txt
- name: Generate unit test report
if: success() || failure()
run: |
go-junit-report -set-exit-code -in build/cbuildtests-${{ matrix.platform }}-amd64.txt -iocopy -out build/cbuildtests-${{ matrix.platform }}-amd64.xml
- name: Install qemu (for Linux-Arm64)
Expand All @@ -99,14 +104,18 @@ jobs:
go-junit-report -set-exit-code -in build/cbuildtests-${{ matrix.platform }}-arm64.txt -iocopy -out build/cbuildtests-${{ matrix.platform }}-arm64.xml
- name: Archive unit test results
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: unit-test-result-${{ matrix.platform }}
path: ./build/cbuildtests-*.xml
if-no-files-found: error

publish-test-results:
if: github.event_name != 'release'
if: ${{ always() && github.event_name != 'release' }}
permissions:
checks: write
pull-requests: write
name: "Publish Tests Results"
needs: [ test ]
runs-on: ubuntu-latest
Expand All @@ -132,9 +141,12 @@ jobs:
- name: publish test results
uses: EnricoMi/publish-unit-test-result-action/composite@v2
with:
commit: ${{ github.event.workflow_run.head_sha }}
files: "testreports/*.xml"
report_individual_runs: true
junit_files: "testreports/*.xml"
# with:
# commit: ${{ github.event.workflow_run.head_sha }}
# report_individual_runs: true
# junit_files: "testreports/*.xml"

coverage:
if: github.event_name != 'release'
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/configs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func TestGetInstallConfigs(t *testing.T) {
assert := assert.New(t)
t.Run("test get install configs with CMSIS_BUILD_ROOT", func(t *testing.T) {
err := os.Setenv("CMSIS_BUILD_ROOT", testRoot+"/run/bin")
assert.Nil(err)
assert.Error(err)
configs, err := GetInstallConfigs()
assert.Nil(err)
assert.NotEmpty(configs.BinPath)
Expand Down

0 comments on commit ef3952b

Please sign in to comment.