This repository has been archived by the owner on Oct 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
1 changed file
with
47 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: CI | ||
|
||
# Run this workflow every time a new commit pushed to your repository | ||
on: push | ||
|
||
jobs: | ||
build-and-test: | ||
name: Build and test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Build | ||
run: ./gradlew build | ||
|
||
- name: Upload Unit Test Results | ||
if: always() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: backend-tests-results # Name artifact for storage in cache | ||
path: | | ||
**/build/test-results/**/*.xml | ||
publish-test-results: | ||
name: Publish tests results | ||
runs-on: ubuntu-latest | ||
needs: build-and-test | ||
# the build-and-test job might be skipped, we don't need to run this job then | ||
if: success() || failure() | ||
permissions: | ||
checks: write | ||
pull-requests: write | ||
|
||
steps: | ||
- name: Download Artifacts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: tests-results # Name of artifact in cache | ||
path: tests-results/ | ||
|
||
- name: Publish Unit Test Results | ||
uses: docker://ghcr.io/enricomi/publish-unit-test-result-action:v1 | ||
if: always() | ||
with: | ||
github_token: ${{ github.token }} | ||
files: tests-results/**/*.xml |