Skip to content

Commit

Permalink
Merge branch 'main' into ewt-389-commercial-vrp-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dili91 authored Jan 2, 2024
2 parents bd68303 + 617ead0 commit e1fb531
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 5 deletions.
56 changes: 55 additions & 1 deletion .github/workflows/acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
description: 'The reference to checkout before running the acceptance tests. Used to run the tests on a fork.'
required: true
type: string
notify_slack_on_failure:
description: 'Whether to notify slack or not.'
required: false
default: false
type: boolean
secrets:
tl_client_id:
required: true
Expand All @@ -17,6 +22,8 @@ on:
required: true
tl_signing_private_key:
required: true
slack_webhook_url:
required: false

jobs:
acceptance-tests:
Expand All @@ -39,4 +46,51 @@ jobs:
TL_CLIENT_SECRET: ${{ secrets.tl_client_secret }}
TL_SIGNING_KEY_ID: ${{ secrets.tl_signing_key_id }}
TL_SIGNING_PRIVATE_KEY: ${{ secrets.tl_signing_private_key }}
run: ./gradlew acceptance-tests
run: ./gradlew acceptance-tests
notify-slack:
needs: acceptance-tests
runs-on: ubuntu-latest
if: ${{ always() && contains(needs.*.result, 'failure') && inputs.notify_slack_on_failure == true }}
steps:
- name: Notify slack
uses: slackapi/slack-github-action@v1.24.0
env:
SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook_url }}
# type is required for custom payloads
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
with:
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":fire: *Acceptance tests* are failing in *Sandbox* on our *Java* backend library! :java:"
}
},
{
"type": "actions",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"text": ":eyes: View on Github"
},
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
]
},
{
"type": "image",
"title": {
"type": "plain_text",
"text": "I don't like that",
"emoji": true
},
"image_url": "https://media.giphy.com/media/4cuyucPeVWbNS/giphy.gif",
"alt_text": "marg"
}
]
}
9 changes: 6 additions & 3 deletions .github/workflows/workflow-scheduled-acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@ name: Scheduled acceptance tests in Sandbox environment

on:
schedule:
- cron: "0 7-19/2 * * *" # every 2 hours between 10 and 20 (UTC)
# every hour between 8 and 19 UTC time
- cron: "0 8-19/1 * * *"

jobs:
scheduled-acceptance-tests:
uses: ./.github/workflows/acceptance-tests.yml
with:
checkout_ref: /refs/heads/main
notify_slack_on_failure: true
checkout_ref: main
secrets:
tl_client_id: ${{ secrets.ACCEPTANCE_TEST_CLIENT_ID }}
tl_client_secret: ${{ secrets.ACCEPTANCE_TEST_CLIENT_SECRET }}
tl_signing_key_id: ${{ secrets.ACCEPTANCE_TEST_SIGNING_KEY_ID }}
tl_signing_private_key: ${{ secrets.ACCEPTANCE_TEST_SIGNING_PRIVATE_KEY }}
tl_signing_private_key: ${{ secrets.ACCEPTANCE_TEST_SIGNING_PRIVATE_KEY }}
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL}}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# TrueLayer Java

[![Release final version](https://github.com/TrueLayer/truelayer-java/actions/workflows/release-final.yml/badge.svg)](https://github.com/TrueLayer/truelayer-java/actions/workflows/release-final.yml)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.truelayer/truelayer-java/badge.svg?style=flat)](https://search.maven.org/artifact/com.truelayer/truelayer-java)
[![javadoc](https://javadoc.io/badge2/com.truelayer/truelayer-java/javadoc.svg)](https://javadoc.io/doc/com.truelayer/truelayer-java)
[![Coverage Status](https://coveralls.io/repos/github/TrueLayer/truelayer-java/badge.svg?t=gcGKQv)](https://coveralls.io/github/TrueLayer/truelayer-java)
[![Scheduled acceptance tests in Sandbox environment](https://github.com/TrueLayer/truelayer-java/actions/workflows/workflow-scheduled-acceptance-tests.yml/badge.svg)](https://github.com/TrueLayer/truelayer-java/actions/workflows/workflow-scheduled-acceptance-tests.yml)
[![License](https://img.shields.io/:license-mit-blue.svg)](https://truelayer.mit-license.org/)

The official [TrueLayer](https://truelayer.com) Java client provides convenient access to TrueLayer APIs from applications built with Java.
Expand Down

0 comments on commit e1fb531

Please sign in to comment.