Add prometheus metrics endpoint #702
Workflow file for this run
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
name: Webhook Broker CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: '1.23.0' | |
- name: Create dist | |
run: mkdir ./dist/ | |
- name: Run Test & Build | |
run: make os-deps dep-tools deps build ci-test | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist-app | |
path: dist/webhook-broker-*.tar.bz2 | |
coverage: | |
needs: [ build ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: "check is CODECLIMATE_REPORTER_ID exists" | |
env: | |
super_secret: ${{ secrets.CODECLIMATE_REPORTER_ID }} | |
if: ${{ env.super_secret == '' }} | |
run: 'echo "echo the secret \"CODECLIMATE_REPORTER_ID\" has not been made; echo please go to \"settings \> secrets \> actions\" to create it"' | |
- uses: actions/checkout@master | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: '1.23.0' | |
- name: Create dist | |
run: mkdir ./dist/ | |
- name: Install dependencies | |
run: make dep-tools deps | |
- uses: paambaati/[email protected] | |
if: ${{ env.CC_TEST_REPORTER_ID != '' }} | |
env: | |
CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_REPORTER_ID }} | |
with: | |
coverageCommand: go test -timeout 30s -coverprofile=cover.out ./... -short | |
debug: true | |
prefix: github.com/newscred/webhook-broker/ | |
coverageLocations: | | |
${{github.workspace}}/*.out:gocov |