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

os-extension-test: fix checkout ref #210

Merged
merged 3 commits into from
May 29, 2024
Merged

Conversation

adangel
Copy link
Contributor

@adangel adangel commented May 23, 2024

The tests are now running against the PR code and not main branch.

Before that, the tests of the main branch were run, but not the PR tests... that caused e.g. that the automerge of liquibase/liquibase-percona#457 failed the build.

The tests are now running against the PR code and not main branch.
@@ -154,6 +154,8 @@ jobs:
needs: build
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
Copy link
Contributor Author

@adangel adangel May 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's better to use ${{ github.ref }} only - the difference is, that "github.event.pull_request.head.sha" is the head commit of the PR, but "github.ref" will be the "pull request merge branch" - that is a temporary merge of the PR into main. This is usually, what we want, as we want to test the integration of the PR with the main branch. Otherwise we might merge the PR but the project will be broken, because the merged PR was never tested.

If this is changed here, then it must also be changed on line 42.

@jandroav jandroav merged commit 3db99ce into liquibase:main May 29, 2024
@jandroav
Copy link
Contributor

Thanks @adangel !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants