-
Notifications
You must be signed in to change notification settings - Fork 27
49 lines (48 loc) · 1.36 KB
/
validate_ibc_path.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
---
name: Validate IBC path
on:
pull_request:
branches:
- main
jobs:
changes:
runs-on: ubuntu-latest
outputs:
paths: ${{ steps.filter.outputs.ibc_files }}
steps:
- uses: dorny/paths-filter@v2
id: filter
with:
list-files: shell
filters: |
ibc:
- added|modified: '(_IBC|testnets/_IBC)/*.json'
Validation:
needs: changes
runs-on: ubuntu-latest
if: ${{ needs.changes.outputs.paths != null }}
steps:
- uses: actions/checkout@v4
- name: Install rly
uses: jaxxstorm/action-install-gh-release@v1
with:
repo: cosmos/relayer
tag: v2.4.2
binaries-location: Cosmos Relayer_2.4.2_linux_amd64
- name: Validate trusting period
shell: bash {0}
run: |
declare -i result=0
paths=(${{ needs.changes.outputs.paths }})
for path in "${paths[@]}"; do
if [[ "$path" != *"cosmoshub-osmosis"* ]]; then
$(scripts/validate_ibc_path.sh $path)
result=$(($result+$?))
else
echo "cosmoshub-osmosis ommitted for path validation."
fi
done
if [[ "$result" -gt 0 ]]; then
echo "Error: Incorrect trusting period for all or some clients" >&2
exit 1
fi