-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsub-validate.yml
More file actions
79 lines (71 loc) · 2.18 KB
/
Copy pathsub-validate.yml
File metadata and controls
79 lines (71 loc) · 2.18 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
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.com/health
jobs:
health-check:
name: Health Check - ${{ inputs.stage }}
runs-on:
labels: ubuntu-latest
environment:
name: ${{ inputs.stage }}
url: ${{ inputs.stage-url }}
steps:
- name: health-check
run: curl "${{ inputs.stage-url }}"
integration-tests:
name: Integration Tests - ${{ inputs.stage }}
runs-on:
labels: ubuntu-latest
environment:
name: ${{ inputs.stage }}
url: ${{ inputs.stage-url }}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: recursive
token: ${{ secrets.PRIVATE_SUBMODULE_ACCESS_TOKEN || github.token }}
- name: "Install Rust ${{ vars.RUST_VERSION }}"
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ vars.RUST_VERSION }}
- name: Restore Cargo cache
id: cache-restore
uses: actions/cache/restore@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/
~/.cargo/git/
target/
key: v0-rust-${{ runner.os }}-cargo-integration-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
v0-rust-${{ runner.os }}-cargo-integration-
- name: Clean target if Cargo.lock changed
if: steps.cache-restore.outputs.cache-hit != 'true'
run: rm -rf target/
- name: "Run Integration Tests"
env:
PROJECT_ID: ${{ secrets.PROJECT_ID }}
RPC_URL: ${{ inputs.stage-url }}
run: cargo test --test integration
- name: Save Cargo cache
uses: actions/cache/save@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/
~/.cargo/git/
target/
key: v0-rust-${{ runner.os }}-cargo-integration-${{ hashFiles('**/Cargo.lock') }}