Skip to content

Commit

Permalink
Add CI/CD of validation
Browse files Browse the repository at this point in the history
  • Loading branch information
HeesungB committed Feb 22, 2024
1 parent 569f6a6 commit 9540f38
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/pull-request-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Pull Request Validation
on:
pull_request:
types: [opened, synchronize]
branches: [main]

jobs:
validation:
name: Pull Request Contract Validation
runs-on: ubuntu-20.04

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup nodejs
uses: actions/setup-node@v3
with:
node-version: "18"

- run: npm install --global yarn
- run: yarn install --frozen-lockfile

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v34
with:
files: |
cosmos/**
- name: Validate changed files
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
if [[ $file == *".json"* && $file != "base.json" ]]; then
yarn validate:token $file
fi
done

1 comment on commit 9540f38

@Arielek9
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

Please sign in to comment.