Skip to content
Merged
Show file tree
Hide file tree
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
38 changes: 38 additions & 0 deletions .github/workflows/publish-test-results.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

name: Annotate test results

on:
workflow_run:
workflows:
- "CI"

jobs:
test-results:
runs-on: ubuntu-latest
name: Test results
if: github.event.workflow_run.conclusion != 'skipped'

steps:
- name: Download and Extract Artifacts
#env:
#GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
mkdir -p artifacts && cd artifacts

artifacts_url=${{ github.event.workflow_run.artifacts_url }}

gh api "$artifacts_url" -q '.artifacts[] | [.name, .archive_download_url] | @tsv' | while read artifact
do
IFS=$'\t' read name url <<< "$artifact"
gh api $url > "$name.zip"
unzip -d "$name" "$name.zip"
done

- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
with:
commit: ${{ github.event.workflow_run.head_sha }}
event_file: artifacts/Event File/event.json
event_name: ${{ github.event.workflow_run.event }}
files: "artifacts/Junit test log files*/*.xml"

35 changes: 10 additions & 25 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

name: CI-tests
name: CI

on:
push:
Expand Down Expand Up @@ -262,30 +262,15 @@ jobs:
name: cookbook-appstore
path: /tmp/appstore.tar.gz


annotate-test-results:
name: Annotate the test results
needs:
- unit-tests
event_file:
name: "Upload Event File"
runs-on: ubuntu-latest
if: success() || failure()

steps:
- name: Download artifact
uses: actions/download-artifact@v2
#with:
#name: Junit test log files
#path: .
- name: List files
shell: bash
run: ls -lR
#if: always()
- name: Publish Unit Test Results
uses: EnricoMi/[email protected]
with:
files: "Junit test log files*/*.xml"
test_changes_limit: 100
#if: always()

- name: Upload
uses: actions/upload-artifact@v2
with:
name: Event File
path: ${{ github.event_path }}
retention-days: 1



2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
[#809](https://github.com/nextcloud/cookbook/pull/809) @christianlupus
- Update stylelint-config-prettier
[#807](https://github.com/nextcloud/cookbook/pull/807) @christianlupus
- Correct unit testing for dependabot and forked branches
[#811](https://github.com/nextcloud/cookbook/pull/811) @christianlupus


## 0.9.4 - 2021-09-29
Expand Down