forked from farazdagi/rpc-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
111 lines (99 loc) · 2.89 KB
/
sub-validate.yml
File metadata and controls
111 lines (99 loc) · 2.89 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: ❖ Validate
on:
workflow_call:
inputs:
stage:
description: 'the environment to validate'
required: true
type: string
default: 'staging'
stage-url:
description: 'the URL of the environment'
required: true
type: string
default: https://${{ vars.SUBDOMAIN_NAME }}.walletconnect.org
permissions:
contents: read
checks: write
id-token: write
jobs:
health-check:
name: Health Check - ${{ inputs.stage }}
runs-on: ubuntu-latest
environment:
name: ${{ inputs.stage }}
url: ${{ inputs.stage-url }}
steps:
- name: health-check
run: curl "${{ inputs.stage-url }}/health"
integration-tests:
name: Integration Tests - ${{ inputs.stage }}
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
environment:
name: ${{ inputs.stage }}
url: ${{ inputs.stage-url }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.PRIVATE_SUBMODULE_ACCESS_TOKEN || github.token }}
submodules: recursive
- name: "Install Rust stable"
uses: WalletConnect/actions-rs/toolchain@1.0.0
with:
toolchain: stable
profile: 'default'
override: true
- name: "Run Integration Tests"
uses: WalletConnect/actions-rs/cargo@1.0.0
env:
PROJECT_ID: ${{ secrets.PROJECT_ID }}
RPC_PROXY_POSTGRES_URI: 'postgres://postgres:root@localhost:5432/postgres'
RPC_URL: ${{ inputs.stage-url }}
with:
command: test
args: --test integration
integration-tests-providers:
name: Providers Integration Tests - ${{ inputs.stage }}
uses: ./.github/workflows/sub-providers.yml
secrets: inherit
with:
providers-directory: "src/providers/"
stage-url: ${{ inputs.stage-url }}
integration-tests-ts:
name: TS Integration Tests - ${{ inputs.stage }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'
- name: Yarn Install
run: yarn install
- name: Yarn Integration Tests
run: yarn integration
env:
PROJECT_ID: ${{ secrets.PROJECT_ID }}
RPC_URL: ${{ inputs.stage-url }}
integration-tests-yttrium:
name: Yttrium integration Tests - ${{ inputs.stage }}
uses: ./.github/workflows/sub-yttrium-integration.yml
secrets: inherit
with:
stage-url: ${{ inputs.stage-url }}