generated from pagopa/pagopa-functions-template
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (71 loc) · 2.65 KB
/
integration_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# name: Integration Tests
# on:
# schedule:
# - cron: '00 08 * * *'
# workflow_dispatch:
# inputs:
# environment:
# required: true
# type: choice
# description: Select the Environment
# options:
# - dev
# - uat
# canary:
# description: 'run the tests on canary version'
# required: false
# type: boolean
# default: false
# notify:
# required: false
# type: boolean
# description: 'send the slack notification'
# default: false
# permissions:
# id-token: write
# contents: read
# deployments: write
# jobs:
# integration_test:
# name: Test ${{(github.event.inputs == null && 'uat') || inputs.environment }}
# runs-on: ubuntu-latest
# environment: ${{(github.event.inputs == null && 'uat') || inputs.environment }}
# steps:
# - name: Checkout
# id: checkout
# uses: actions/checkout@1f9a0c22da41e6ebfa534300ef656657ea2c6707
# - name: Login
# id: login
# # from https://github.com/Azure/login/commits/master
# uses: azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2
# with:
# client-id: ${{ secrets.CLIENT_ID }}
# tenant-id: ${{ secrets.TENANT_ID }}
# subscription-id: ${{ secrets.SUBSCRIPTION_ID }}
# - name: Run Integration Tests
# shell: bash
# run: |
# export SUBKEY=${{ secrets.SUBKEY }}
# export CANARY=${{ inputs.canary }}
# export CUCUMBER_PUBLISH_TOKEN=${{ secrets.CUCUMBER_PUBLISH_TOKEN }}
# export GPD_SUBKEY='${{ secrets.GPD_SUBKEY }}'
# cd ./integration-test
# chmod +x ./run_integration_test.sh
# ./run_integration_test.sh ${{( github.event.inputs == null && 'uat') || inputs.environment }}
# notify:
# needs: [ integration_test ]
# runs-on: ubuntu-latest
# name: Notify
# if: ${{ always() && (github.event_name == 'schedule' || inputs.notify == true ) }}
# steps:
# - name: Report Status
# uses: ravsamhq/notify-slack-action@be814b201e233b2dc673608aa46e5447c8ab13f2 # v2
# with:
# status: ${{ needs.integration_test.result }}
# token: ${{ secrets.GITHUB_TOKEN }}
# notify_when: 'failure,skipped'
# notification_title: '<{run_url}|Scheduled Integration Test> has {status_message}'
# message_format: '{emoji} <{run_url}|{workflow}> {status_message} in <{repo_url}|{repo}> in ${{ inputs.environment }}'
# footer: 'Linked to <{workflow_url}| workflow file>'
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}