Skip to content

Commit

Permalink
add a check to execute deployments tests only if a deployment.json fi…
Browse files Browse the repository at this point in the history
…le changed
  • Loading branch information
mjlescano committed Jun 16, 2021
1 parent 29684b5 commit 4ca4db6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,13 @@ jobs:
- checkout
- attach_workspace:
at: .
- run:
name: Only run when publish/deployed/*/deployment.json changes
command: |
changes=$(git diff --name-status origin/develop | grep 'publish\/deployed\/[a-z0-9\-]*\/deployment\.json$' || true)
if [ -z "$changes" ]; then
circleci-agent step halt
fi;
- run: npm run test:deployments
job-validate-etherscan:
working_directory: ~/repo
Expand Down
7 changes: 7 additions & 0 deletions .circleci/src/jobs/job-validate-deployments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,11 @@ steps:
- checkout
- attach_workspace:
at: .
- run:
name: Only run when publish/deployed/*/deployment.json changes
command: |
changes=$(git diff --name-status origin/develop | grep 'publish\/deployed\/[a-z0-9\-]*\/deployment\.json$' || true)
if [ -z "$changes" ]; then
circleci-agent step halt
fi;
- run: npm run test:deployments

0 comments on commit 4ca4db6

Please sign in to comment.