-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5adcfb7
commit 091c7ff
Showing
5 changed files
with
86 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ jobs: | |
|
||
- name: Validate Gradle wrapper | ||
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b | ||
|
||
- name: Gradle cache | ||
uses: gradle/gradle-build-action@v2 | ||
|
||
|
@@ -51,32 +51,34 @@ jobs: | |
- name: Install Pip for test result publishing | ||
run: sudo apt-get install -y python3-pip | ||
|
||
- name: Publish Unit Test Results | ||
uses: EnricoMi/publish-unit-test-result-action/[email protected] | ||
# Uploads test results as GitHub artifacts, so publish-test-results can find them later. | ||
# This name is referenced in the publish-test-results workflow. | ||
- name: Upload Test Results | ||
uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
files: | | ||
**/build/test-results/testDevDebugUnitTest/**/*.xml | ||
**/build/test-results/**/*.xml | ||
**/build/outputs/androidTest-results/**/*.xml | ||
- name: Generate report | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: report | ||
path: app/build/reports/jacoco | ||
- name: Generate report | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: report | ||
path: app/build/reports/jacoco | ||
|
||
- name: Download Test Reports Folder | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: report | ||
path: app/build/reports/jacoco | ||
- name: Download Test Reports Folder | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: report | ||
path: app/build/reports/jacoco | ||
|
||
- name: Upload Test Report | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
files: "app/build/reports/jacoco/jacocoReport/jacocoReport.xml" | ||
|
||
- name: Upload Test Report | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
files: "app/build/reports/jacoco/jacocoReport/jacocoReport.xml" | ||
|
||
- name: Cleanup Gradle Cache | ||
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions. | ||
# Restoring these files from a GitHub Actions cache might cause problems for future builds. | ||
|
@@ -98,3 +100,13 @@ jobs: | |
with: | ||
flavour: "dev-debug" | ||
|
||
event_file: | ||
# This name is referenced in the publish-test-results workflow. | ||
name: "Upload Event File" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Upload | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Event File | ||
path: ${{ github.event_path }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,8 @@ on: | |
jobs: | ||
add-jira-description: | ||
runs-on: ubuntu-latest | ||
# Run only if the PR is not from a Fork / external contributor | ||
if: github.repository_owner == 'wireapp' | ||
steps: | ||
- uses: cakeinpanic/[email protected] | ||
name: jira-description-action | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Publish Test Results | ||
|
||
# Takes the artifacts uploaded by run-unit-tests and publishes them in PRs as a comment. | ||
# This is needed in order to support PRs created from forks, as PRs from Forks or Dependabot | ||
# run in read-only mode and can't comment on PRs, for example. | ||
# More context here: https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/ | ||
# This work-around makes it so that: | ||
# - this workflow is triggered by the end of the test workflow, instead | ||
# of being triggered directly by the PR | ||
# - we can control the permissions to only have what's needed to write comments, etc. | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Run Unit Tests"] | ||
types: | ||
- completed | ||
permissions: {} | ||
|
||
jobs: | ||
test-results: | ||
name: Publish Test Results | ||
runs-on: ubuntu-latest | ||
if: github.event.workflow_run.conclusion != 'skipped' | ||
|
||
# Limit permissions to only what's needed | ||
permissions: | ||
checks: write | ||
|
||
# needed to write the PR comment with the results | ||
pull-requests: write | ||
# required in order to download step to access artifacts API | ||
actions: read | ||
|
||
steps: | ||
- name: Download and Extract Artifacts | ||
uses: dawidd6/action-download-artifact@v2 | ||
with: | ||
run_id: ${{ github.event.workflow_run.id }} | ||
path: artifacts | ||
|
||
- name: Publish Test Results | ||
uses: EnricoMi/publish-unit-test-result-action@v2 | ||
with: | ||
commit: ${{ github.event.workflow_run.head_sha }} | ||
event_file: artifacts/Upload Event File/event.json | ||
event_name: ${{ github.event.workflow_run.event }} | ||
files: "artifacts/Upload Test Results/**/*.xml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters