-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't create main branch when on main and don't run some tests on main
The ReusableTest workflow creates a main branch due a specific test recently introduced. That specific runs the generation on main and on HEAD. Both activites make no sense if we are running on the main branch. This creates a condition on the workflow to only run if the branch is not main (a condition on PRs would also work, but we leave the possibility of running tests on others branches with this approach). Furthermore, this also adds a condition in the tests such that only on main the tests are run. Closes #435
- Loading branch information
1 parent
cd4d423
commit c89fb23
Showing
2 changed files
with
38 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,9 @@ jobs: | |
- run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Action" | ||
- name: Create branch main | ||
if: github.ref != 'refs/heads/main' | ||
run: | | ||
git branch this-pr | ||
git checkout origin/main | ||
git branch --track main origin/main | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters