Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add tests to deploy #38

Merged
merged 1 commit into from
Aug 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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