Skip to content

Commit

Permalink
fix: ensure tests are properly running against broken main
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav committed Sep 6, 2023
1 parent eeed6da commit 2aac164
Show file tree
Hide file tree
Showing 7 changed files with 150 additions and 3,032 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/integration-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ jobs:
- name: Verify default Push Workflow
if: ${{ github.event_name != 'pull_request' }}
run: |
BASE_SHA=$(echo $(git rev-parse HEAD~1))
if git merge-base --is-ancestor $NX_BASE HEAD; then
BASE_SHA=$NX_BASE;
else
BASE_SHA="";
fi
HEAD_SHA=$(echo $(git rev-parse HEAD))
node -e "if(process.env.NX_BASE == '${BASE_SHA}') console.log('Base set correctly'); else { throw new Error('Base not set correctly!');}"
node -e "if(process.env.NX_HEAD == '${HEAD_SHA}') console.log('Head set correctly'); else { throw new Error('Head not set correctly!');}"
6 changes: 5 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ jobs:
if: github.event_name != 'pull_request'
shell: bash
run: |
BASE_SHA=$(echo $(git rev-parse HEAD~1))
if git merge-base --is-ancestor $NX_BASE HEAD; then
BASE_SHA=$NX_BASE;
else
BASE_SHA="";
fi
HEAD_SHA=$(echo $(git rev-parse HEAD))
node -e "if(process.env.NX_BASE == '${BASE_SHA}') console.log('Base set correctly'); else { throw new Error('Base not set correctly!');}"
node -e "if(process.env.NX_HEAD == '${HEAD_SHA}') console.log('Head set correctly'); else { throw new Error('Head not set correctly!');}"
Loading

0 comments on commit 2aac164

Please sign in to comment.