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

github: fix the comments in test-osbuild-composer-integration #1028

Merged
Changes from 1 commit
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
32 changes: 16 additions & 16 deletions .github/workflows/test-osbuild-composer-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,20 @@ name: "osbuild-composer integration"
# author and reviewers of this change. The workflow works as follows:
#
# 1. Checks out osbuild/osbuild-composer
# 2. Replaces the osbuild/images dependency with the *merge base* of the open
# PR with main and runs osbuild-composer's unit tests.
# 3. If the unit tests on the merge base (step 2) succeed, replaces the
# 2. Replaces the osbuild/images dependency with the base of the PR (this is
# the HEAD of main at the time the PR was opened or updated) and runs
# osbuild-composer's unit tests.
# 3. If the unit tests on the base (step 2) succeed, replaces the
# osbuild/images dependency with the *HEAD* of the open PR and runs
# osbuild-composer's unit tests. If the tests on the merge base failed, no
# further action is taken.
# osbuild-composer's unit tests. If the tests on the base failed, no further
# action is taken.
# 4. At most one of two messages is posted:
# 4.1 Posts a message on the open PR only if the unit tests with the merge base
# (step 2) succeed and the unit tests with the PR HEAD (step 3) fail. This
# 4.1 Posts a message on the open PR only if the unit tests with the base (step
# 2) succeed and the unit tests with the PR HEAD (step 3) fail. This
# combination of outcomes indicates that the PR is the one responsible for
# the breakage.
# 4.2 Updates the existing message on the open PR only if the unit tests with
# the merge base (step2) succeed, the unit tests with the PR HEAD (step 3)
# the base (step2) succeed, the unit tests with the PR HEAD (step 3)
# succeed, and there is already a message posted by this workflow. This is
# meant for cases where a PR initially breaks compatibility and then it gets
# fixed. No message should be posted on a PR that doesn't affect the
Expand All @@ -32,8 +33,8 @@ name: "osbuild-composer integration"
# PR. Running on pull_request_target is needed to have access to repository
# secrets (Schutzbot's GitHub token).
# 2. If the unit tests in this repository fail, the integration will fail and
# the message will be posted (if the integration is not failing on the merge
# base). This will happen even if there's no actual integration issue, so
# the message will be posted (if the integration is not also failing on
# main). This will happen even if there's no actual integration issue, so
# the message can be misleading. However, subsequent runs that fix the issue
# will update the message accordingly.

Expand All @@ -55,8 +56,7 @@ jobs:
outputs:
# Define job outputs
# (see https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/passing-information-between-jobs#example-defining-outputs-for-a-job)
# One output for the test with the merge base and one for the test against
# the PR
# One output for the test with the base and one for the test against the PR
base_test: ${{ steps.tests-base.outputs.base_test }}
pr_test: ${{ steps.tests-pr.outputs.pr_test }}

Expand All @@ -83,15 +83,15 @@ jobs:
- name: Mark the working directory as safe for git
run: git config --global --add safe.directory "$(pwd)"

- name: Update the osbuild/images reference to the merge base with main
- name: Update the osbuild/images reference to the base (main)
env:
merge_base_sha: ${{ github.event.pull_request.base.sha }}
base_sha: ${{ github.event.pull_request.base.sha }}
run: |
cd osbuild-composer
go mod edit -replace github.com/osbuild/images=github.com/osbuild/images@$merge_base_sha
go mod edit -replace github.com/osbuild/images=github.com/osbuild/images@$base_sha
./tools/prepare-source.sh

- name: Run unit tests (merge base)
- name: Run unit tests (main)
working-directory: osbuild-composer
id: tests-base
# This step will not fail if the test fails, but it will write the
Expand Down
Loading