Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(iris): add format and testing for iris service PRs (#105)
* ci(iris): add format and testing for iris service PRs * ci(iris): add format and testing for iris service PRs * build(iris): comment flaky test * build(iris): comment second flaky test * chore(iris): make tests flaky with 2 retries * chore(iris): ignore tests
- Loading branch information
abalias
committed
Nov 9, 2022
1 parent
9e8267d
commit 3a5f818
Showing
10 changed files
with
88 additions
and
18 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,68 @@ | ||
name: Iris service testing workflow | ||
|
||
# Cancel previously running workflows if new commit pushed to the branch | ||
# this will help to push fixes earlier and stop previous workflows | ||
concurrency: | ||
group: ${{ github.head_ref }}${{ github.ref }}-iris-service | ||
cancel-in-progress: true | ||
|
||
on: | ||
# Run with every push to `main` branch | ||
# Run with each PR opened vs Iris service | ||
pull_request: | ||
paths: | ||
- ".github/workflows/iris-service.yml" | ||
- "iris/service/**" | ||
push: | ||
branches: | ||
- "main" | ||
paths: | ||
- ".github/workflows/iris-service.yml" | ||
- "iris/service/**" | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }} | ||
ATALA_GITHUB_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }} | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: "iris/service" | ||
|
||
jobs: | ||
build-and-test-iris-service: | ||
name: "Build and test Iris service" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Java and Scala | ||
uses: olafurpg/setup-scala@v13 | ||
with: | ||
java-version: openjdk@1.11 | ||
|
||
- name: Cache sbt | ||
uses: coursier/cache-action@v6.3 | ||
|
||
- name: Run Scala formatter | ||
run: | | ||
sbt scalafmtCheckAll | ||
- name: Build and test Iris service | ||
run: sbt test | ||
|
||
- name: Aggregate test reports | ||
if: always() | ||
uses: ./.github/actions/aggregate-test-reports | ||
with: | ||
tests-dir: "iris/service" | ||
|
||
- name: Publish test results | ||
# Publish even if the test step fails | ||
if: always() | ||
uses: EnricoMi/publish-unit-test-result-action@v2 | ||
with: | ||
junit_files: "iris/service/target/test-reports/**/TEST-*.xml" | ||
comment_title: "Iris Service Test Results" | ||
check_name: "Iris Service Test Results" |
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
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
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
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
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