Skip to content

Commit

Permalink
chore: add tests to deploy (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav authored Aug 9, 2022
1 parent 619a6ca commit b3e7979
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .circleci/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,25 @@ jobs:
steps:
- checkout
- nx/set-shas
- run:
name: Check values
shell: "/bin/bash"
command: |
HEAD_SHA=$(git rev-parse HEAD)
if [[ -z "$CIRCLE_PULL_REQUEST" ]]; then
BASE_SHA=$(git merge-base origin/main HEAD)
else
BASE_SHA=$(git rev-parse origin/main~1)
fi
echo "Comparing head: $NX_HEAD to $HEAD_SHA"
echo "Comparing base: $NX_BASE to $BASE_SHA"
if [[ $NX_HEAD == $HEAD_SHA && $NX_BASE == $BASE_SHA ]]; then
echo "Test conditions met"
else
echo "Exiting Job"
circleci-agent step halt
fi
workflows:
test-deploy:
jobs:
Expand Down

0 comments on commit b3e7979

Please sign in to comment.