Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/actions/mergify-insights/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: mergify-insights
description: upload test results to Mergify

inputs:
token:
description: 'The mergify token'
required: true
job_name:
description: 'The name of the job'
required: false
default: ${{ github.job }}

runs:
using: composite
steps:
- run: |
go install github.com/jstemmer/go-junit-report@latest
cat test.output | go-junit-report > junit.xml
shell: bash
- name: Mergify CI Upload
if: (success() || failure()) && github.event_name != 'pull_request' || ( github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false )
uses: mergifyio/gha-mergify-ci@6875ab3991ec1db831576df1cd00a7870603aa9e # v8
with:
token: ${{ inputs.token }}
report_path: junit.xml
job_name: ${{ inputs.job_name }}
39 changes: 39 additions & 0 deletions .github/workflows/ci-insights.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: ci-insights

on:
push:
branches:
- "feature/gh-test-reports-insights"
schedule:
- cron: '0 */3 * * *'
workflow_dispatch:

permissions:
contents: read

jobs:
unit-tests:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5

- uses: actions/setup-go@v6
with:
go-version-file: .go-version

- name: Install make
if: runner.os == 'macOS'
run: |
brew install make
export PATH="/usr/local/opt/make/libexec/gnubin:$PATH"

- run: go test -v -race ./... 2>&1 | tee test.output
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this test.output file a standard somehow? If not I would like to pass it to the action as an input parameter. What do you think?


- uses: ./.github/actions/mergify-insights
with:
job_name: ${{ github.job }}-${{ matrix.os }}
token: ${{ secrets.MERGIFY_TOKEN }}
Loading