From 551326f6de55fb4526de6b58ed97da1c49dacfe2 Mon Sep 17 00:00:00 2001 From: Pavel Vetokhin Date: Sat, 16 Sep 2023 10:32:31 +0300 Subject: [PATCH] Try to create checks --- .github/workflows/solution-sanity.yml | 40 ++++++++++++++++++- .../construction/{ => spec}/TestingBeans.java | 2 +- 2 files changed, 39 insertions(+), 3 deletions(-) rename libs/testing/src/main/java/smecalculus/bezmen/construction/{ => spec}/TestingBeans.java (94%) diff --git a/.github/workflows/solution-sanity.yml b/.github/workflows/solution-sanity.yml index d2ce0715..ce5b33a4 100644 --- a/.github/workflows/solution-sanity.yml +++ b/.github/workflows/solution-sanity.yml @@ -22,12 +22,31 @@ jobs: - uses: ./.github/actions/prepare with: tools: python java - - run: ansible-playbook sources.yml -l lib:app + - id: codebase + run: ansible-playbook sources.yml -l lib:app working-directory: .dx env: GITHUB_ACTOR: ${{ github.actor }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - run: > + - uses: actions/github-script@v6.4.1 + with: + script: | + // Docs: https://docs.github.com/en/rest/checks/runs#create-a-check-run + // Rest: https://octokit.github.io/rest.js/v20#checks-create + await github.rest.checks.create({ + owner: context.repo.owner, + repo: context.repo.repo, + name: "codebase-checks", + status: "completed", + conclusion: "${{ steps.codebase.outcome }}", + output: { + title: "Codebase checks", + summary: "${{ steps.codebase.outcome }}", + text: "${{ steps.codebase.outcome }}", + }, + }); + - id: binaries + run: > ansible-playbook binaries.yml -e binary_repo=maven.pkg.github.com -e focus=solution @@ -48,3 +67,20 @@ jobs: files: | libs/*/target/surefire-reports/TEST-*.xml apps/*/target/surefire-reports/TEST-*.xml + - uses: actions/github-script@v6.4.1 + with: + script: | + // Docs: https://docs.github.com/en/rest/checks/runs#create-a-check-run + // Rest: https://octokit.github.io/rest.js/v20#checks-create + await github.rest.checks.create({ + owner: context.repo.owner, + repo: context.repo.repo, + name: "unit-tests", + status: "completed", + conclusion: "${{ steps.binaries.outcome }}", + output: { + title: "Unit tests", + summary: "${{ steps.binaries.outcome }}", + text: "${{ steps.binaries.outcome }}", + }, + }); diff --git a/libs/testing/src/main/java/smecalculus/bezmen/construction/TestingBeans.java b/libs/testing/src/main/java/smecalculus/bezmen/construction/spec/TestingBeans.java similarity index 94% rename from libs/testing/src/main/java/smecalculus/bezmen/construction/TestingBeans.java rename to libs/testing/src/main/java/smecalculus/bezmen/construction/spec/TestingBeans.java index 0b2f1f5f..59fdb287 100644 --- a/libs/testing/src/main/java/smecalculus/bezmen/construction/TestingBeans.java +++ b/libs/testing/src/main/java/smecalculus/bezmen/construction/spec/TestingBeans.java @@ -1,4 +1,4 @@ -package smecalculus.bezmen.construction; +package smecalculus.bezmen.construction.spec; import static org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType.H2;