Skip to content

Commit 9540f38

Browse files
committed
Add CI/CD of validation
1 parent 569f6a6 commit 9540f38

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Pull Request Validation
2+
on:
3+
pull_request:
4+
types: [opened, synchronize]
5+
branches: [main]
6+
7+
jobs:
8+
validation:
9+
name: Pull Request Contract Validation
10+
runs-on: ubuntu-20.04
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Setup nodejs
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: "18"
22+
23+
- run: npm install --global yarn
24+
- run: yarn install --frozen-lockfile
25+
26+
- name: Get changed files
27+
id: changed-files
28+
uses: tj-actions/changed-files@v34
29+
with:
30+
files: |
31+
cosmos/**
32+
33+
- name: Validate changed files
34+
run: |
35+
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
36+
if [[ $file == *".json"* && $file != "base.json" ]]; then
37+
yarn validate:token $file
38+
fi
39+
done

0 commit comments

Comments
 (0)