-
Notifications
You must be signed in to change notification settings - Fork 8
52 lines (50 loc) · 1.72 KB
/
validate-mock-provider.yaml
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
name: Validate mock-provider
on:
# Manual trigger
workflow_dispatch:
# Cron schedule for every weekday at 4 PM GMT
schedule:
- cron: '0 16 * * 1-5'
jobs:
validate:
name: Validate mock-provider
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16'
check-latest: true
- uses: actions/cache@v4
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Get specification swagger
uses: wei/curl@v1
with:
args: -o specification-swagger.yaml https://raw.githubusercontent.com/fiatconnect/specification/main/swagger.yaml
- run: yarn
- run: yarn validate
env:
BASE_URL: ${{ secrets.MOCK_PROVIDER_BASE_URL }}
CLIENT_API_KEY: ${{ secrets.MOCK_PROVIDER_API_KEY }}
PROVIDER_ID: ${{ secrets.MOCK_PROVIDER_ID }}
OPENAPI_SPEC: specification-swagger.yaml
QUOTE_OUT_MOCK: quoteNigeriaCUSD
FIAT_ACCOUNT_MOCK: accountNumberNigeria
KYC_MOCK: personalDataAndDocumentsNigeria
- uses: ravsamhq/notify-slack-action@v2
if: always()
with:
status: ${{ job.status }}
notification_title: '{workflow} has {status_message}'
message_format: '{emoji} *{workflow}* {status_message}. <{run_url}|View Run>'
footer: 'Repo: <{repo_url}|{repo}>'
notify_when: 'failure'
# Tag @eng-activation on failures
mention_groups: 'S02G1BH7D08'
mention_groups_when: 'failure'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}