Skip to content

Commit

Permalink
Merge pull request #40 from Agoric/rs-ci-enhancements
Browse files Browse the repository at this point in the history
CI improvements
  • Loading branch information
rabi-siddique authored Dec 24, 2024
2 parents f5014c3 + 6f2003c commit 2bab26f
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/actions/notify-status/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Notify GitHub Actions Status on Slack
description: Notify Slack about the status of GitHub Actions jobs

inputs:
webhook:
description: 'Slack Webhook URL to send the alerts'
required: true

runs:
using: composite
steps:
- name: Send GitHub Actions Status to Slack
id: slack
uses: slackapi/[email protected]
with:
payload: |
{
"text": "Job ${{ github.job }} in workflow ${{ github.workflow }} of repository ${{ github.repository }} has a status of ${{ job.status }}.\nDetails: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
"username": "GitHub Actions"
}
env:
SLACK_WEBHOOK_URL: ${{ inputs.webhook }}
18 changes: 18 additions & 0 deletions .github/workflows/liquidation.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
name: Liquidation Indexing
on:
schedule:
- cron: '10 1 * * *'
push:
branches: [main]
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
Expand Down Expand Up @@ -128,3 +137,12 @@ jobs:
run: ./scripts/getActiveVaults.mjs
env:
expectedVaults: 7

- name: Notify About Failure
if: >
failure() && github.event_name != 'pull_request' &&
github.repository_owner == 'agoric'
uses: ./.github/actions/notify-status
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
continue-on-error: true
7 changes: 7 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: PR
on:
push:
branches: [main]
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/vaults-and-reserve-metrics-testing.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
name: Vaults and Reserve Indexing
on:
schedule:
- cron: '10 1 * * *'
push:
branches: [main]
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
Expand Down Expand Up @@ -77,3 +86,12 @@ jobs:
env:
entity: reserveAllocationMetricsDailies
blockHeight: 1212

- name: Notify About Failure
if: >
failure() && github.event_name != 'pull_request' &&
github.repository_owner == 'agoric'
uses: ./.github/actions/notify-status
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
continue-on-error: true

0 comments on commit 2bab26f

Please sign in to comment.