Skip to content

Solution sanity

Solution sanity #3

Workflow file for this run

---
name: Solution sanity
on:
pull_request:
branches-ignore:
- main
paths: # waiting for https://github.com/actions/runner/issues/2324
- libs/**
- apps/**
- schemas/**
- solutions/**
workflow_dispatch:
jobs:
up-to-binaries:
name: Up to binaries
timeout-minutes: 5
runs-on: ubuntu-22.04
permissions:
checks: write
steps:
- uses: actions/[email protected]
- uses: ./.github/actions/prepare
with:
tools: python java
- id: codebase
# run: ansible-playbook sources.yml -l lib:app
run: echo foo
working-directory: .dx
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/[email protected]
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
working-directory: .dx
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: EnricoMi/[email protected]
if: ${{ !cancelled() }}
with:
check_name: Unit Test Report
check_run_annotations: none
compare_to_earlier_commit: false
action_fail_on_inconclusive: true
action_fail: true
job_summary: false
comment_mode: off
files: |
libs/*/target/surefire-reports/TEST-*.xml
apps/*/target/surefire-reports/TEST-*.xml
- uses: actions/[email protected]
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 }}",
},
});