Skip to content

Commit

Permalink
Merge branch 'master' into IOAPPX-227-remove-abort-controller
Browse files Browse the repository at this point in the history
  • Loading branch information
CrisTofani authored Jan 30, 2024
2 parents f6b7369 + d51761c commit 8b3145a
Show file tree
Hide file tree
Showing 241 changed files with 4,228 additions and 15,645 deletions.
20 changes: 20 additions & 0 deletions .github/actions/notify-e2e/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Actions to notify E2E tests failure through Slack message
description: 'This action collects the steps to setup python env and run job'
runs:
using: "composite"
steps:
- name: setup python
uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b #v4.6.0
with:
python-version: '3.8'
- name: install pipenv
run: pip install pipenv
shell: bash
- name: report E2E tests failure
run: |
cd scripts/e2e_message
pipenv install
pipenv run python3 e2e_notifier.py
env:
BUILD_ID: ${{ github.run_id }}
shell: bash
6 changes: 6 additions & 0 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
run-e2e-test-ios:
needs: run-static-checks
runs-on: macos-latest
environment: dev
concurrency:
group: ${{ github.workflow }}-e2e-tests-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
Expand Down Expand Up @@ -60,6 +61,11 @@ jobs:
path: './_io-dev-api-server_'
- id: run-e2e-tests
run: bash ./.github/scripts/run-e2e-tests.sh
- id: notify-test-failure
if: failure()
uses: ./.github/actions/notify-e2e
env:
IO_APP_SLACK_HELPER_BOT_TOKEN: ${{ secrets.IO_APP_SLACK_HELPER_BOT_TOKEN }}
- id: upload-artifacts
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v.3.1.2
if: always()
Expand Down
Binary file removed img/bonus/bpd/bonus_bg.png
Binary file not shown.
Binary file removed img/bonus/bpd/bonus_preview_bg.png
Binary file not shown.
Binary file removed img/bonus/bpd/fireworks.png
Binary file not shown.
Binary file removed img/bonus/bpd/logo_BonusCashback_White.png
Binary file not shown.
Binary file removed img/bonus/bpd/logo_cashback_blue.png
Binary file not shown.
2 changes: 1 addition & 1 deletion locales/de/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2459,7 +2459,7 @@ transaction:
title: "Details zur Transaktion"
totalAmount: "Insgesamt"
totalFee: "Der Gesamtbetrag umfasst "
totalFeePsp: "Provision, berechnet von {{pspName}}"
totalFeePsp: "Provision, berechnet von {{pspName}}."
totalFeeNoPsp: "Provision, die vom Transaktionsdienstleister (PSP) erhoben wird."
info:
title: "Informationen zur Transaktion"
Expand Down
4 changes: 3 additions & 1 deletion locales/en/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3116,6 +3116,8 @@ features:
activated: "Grazie, il servizio è attivo!"
error: "Si è verificato un errore con la tua richiesta"
details:
badge:
legalValue: "Legal value"
title: Dettaglio del messaggio
noticeCode: "Codice avviso"
loadError:
Expand Down Expand Up @@ -3859,7 +3861,7 @@ transaction:
title: Dettaglio operazione
totalAmount: Totale
totalFee: Il totale comprende
totalFeePsp: di commissione, applicata da {{pspName}}
totalFeePsp: "di commissione, applicata da {{pspName}}."
totalFeeNoPsp: "di commissione, applicata dal gestore della transazione (PSP)."
info:
title: Informazioni sulla transazione
Expand Down
4 changes: 3 additions & 1 deletion locales/it/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3116,6 +3116,8 @@ features:
activated: "Grazie, il servizio è attivo!"
error: "Si è verificato un errore con la tua richiesta"
details:
badge:
legalValue: "Valore legale"
title: Dettaglio del messaggio
noticeCode: "Codice avviso"
loadError:
Expand Down Expand Up @@ -3859,7 +3861,7 @@ transaction:
title: Dettaglio operazione
totalAmount: Totale
totalFee: Il totale comprende
totalFeePsp: di commissione, applicata da {{pspName}}
totalFeePsp: "di commissione, applicata da {{pspName}}."
totalFeeNoPsp: "di commissione, applicata dal gestore della transazione (PSP)."
info:
title: Informazioni sulla transazione
Expand Down
15 changes: 15 additions & 0 deletions scripts/e2e_message/Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]
urllib3 = ">=1.26.6"
requests = "*"
slackclient = "*"
urlextract = "*"

[requires]
python_version = "3.8"
557 changes: 557 additions & 0 deletions scripts/e2e_message/Pipfile.lock

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions scripts/e2e_message/e2e_notifier.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import os
import ssl
from os.path import join

import certifi
import urllib3
from slack import WebClient
from slack.errors import SlackApiError

urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

SLACK_TOKEN = os.environ.get("IO_APP_SLACK_HELPER_BOT_TOKEN", None)
tagged_people = ["<!here>"]
SLACK_CHANNEL = "#io_dev_app_feed"
BUILD_ID = os.environ.get("BUILD_ID", None)
BASE_ACTION_URI = "https://github.com/pagopa/io-app/actions/runs/"

def send_slack_message():
"""
Sends the report of the check to slack to notify the status of the E2E tests of the app
:return:
"""
try:
# avoid ssl certificate warning
ssl_context = ssl.create_default_context(cafile=certifi.where())
rtm_client = WebClient(
token=SLACK_TOKEN, ssl=ssl_context
)
tags = " ".join(tagged_people)
message = "[E2E Tests] :warning: %s e2e tests have failed (<%s%s|here>)" % (
tags, BASE_ACTION_URI, BUILD_ID)
message_blocks = []
message_blocks.append({
"type": "section",
"text": {
"type": "mrkdwn",
"text": message
}
})
rtm_client.chat_postMessage(
channel=SLACK_CHANNEL,
blocks=message_blocks
)


except SlackApiError as e:
# You will get a SlackApiError if "ok" is False
assert e.response["ok"] is False
# str like 'invalid_auth', 'channel_not_found'
assert e.response["error"]
print(f"Got an error: {e.response['error']}")

if SLACK_TOKEN:
send_slack_message()
else:
print("no SLACK token provided")
13 changes: 0 additions & 13 deletions ts/features/bonus/bpd/api/award-period/v1.ts

This file was deleted.

109 changes: 0 additions & 109 deletions ts/features/bonus/bpd/api/backendBpdClient.ts

This file was deleted.

Loading

0 comments on commit 8b3145a

Please sign in to comment.