mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-07 03:22:18 +00:00
60 lines
1.8 KiB
YAML
60 lines
1.8 KiB
YAML
name: Hive results
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows: ["CI"]
|
|
types:
|
|
- completed
|
|
|
|
jobs:
|
|
hive-results:
|
|
name: Hive results
|
|
runs-on: ubuntu-latest
|
|
if: github.event.workflow_run.conclusion != 'skipped'
|
|
|
|
permissions:
|
|
checks: write
|
|
pull-requests: write
|
|
actions: read
|
|
|
|
steps:
|
|
- name: parse hive results
|
|
uses: phoenix-actions/test-reporting@v8
|
|
with:
|
|
artifact: test-results
|
|
name: Tests
|
|
path: '*.xml'
|
|
reporter: java-junit
|
|
|
|
- name: set badge color
|
|
shell: bash
|
|
run: |
|
|
case ${{ fromJSON( steps.test-results.outputs.json ).conclusion }} in
|
|
success)
|
|
echo "BADGE_COLOR=31c653" >> $GITHUB_ENV
|
|
;;
|
|
failure)
|
|
echo "BADGE_COLOR=800000" >> $GITHUB_ENV
|
|
;;
|
|
neutral)
|
|
echo "BADGE_COLOR=696969" >> $GITHUB_ENV
|
|
;;
|
|
esac
|
|
|
|
- name: create badge
|
|
uses: emibcn/badge-action@d6f51ff11b5c3382b3b88689ae2d6db22d9737d1
|
|
with:
|
|
label: Hive
|
|
status: '${{ fromJSON( steps.test-results.outputs.json ).formatted.stats.tests }} tests, ${{ fromJSON( steps.test-results.outputs.json ).formatted.stats.runs }} runs: ${{ fromJSON( steps.test-results.outputs.json ).conclusion }}'
|
|
color: ${{ env.BADGE_COLOR }}
|
|
path: badge.svg
|
|
|
|
- name: upload badge to gist
|
|
if: >
|
|
github.event_name == 'workflow_run' && github.event.workflow_run.head_branch == 'devel' ||
|
|
github.event_name != 'workflow_run' && github.ref == 'refs/heads/devel'
|
|
uses: andymckay/append-gist-action@1fbfbbce708a39bd45846f0955ed5521f2099c6d
|
|
with:
|
|
token: ${{ secrets.GIST_TOKEN }}
|
|
gistURL: https://gist.githubusercontent.com/revittm/dc492845ba6eb694e6c7279224634b20
|
|
file: badge.svg |