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

[EJBCLIENT-505] CI Add integration testing to CI script #639

Closed
wants to merge 2 commits into from

Conversation

tadamski
Copy link
Contributor

@tadamski tadamski commented Jul 11, 2023

@tadamski tadamski requested a review from chengfang as a code owner July 11, 2023 13:51
@@ -0,0 +1,7 @@
echo "INTEGRATION TESTS"

git clone https://github.com/wildfly/ejb-client-testsuite
Copy link
Contributor

Choose a reason for hiding this comment

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

we can clone a shallow copy of the repo, to speed it up a bit:

git clone --depth=1 https://github.com/wildfly/ejb-client-testsuite


cd ejb-client-testsuite

mvn clean test
Copy link
Contributor

Choose a reason for hiding this comment

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

we can use the options below to filter out a lot of useless output:

mvn -B -ntp

Comment on lines 18 to 22
- name: Configure runner - Linux
if: contains(matrix.os, 'ubuntu')
run: |
sudo bash -c "echo '127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4' > /etc/hosts"
sudo bash -c "echo '::1 localhost localhost.localdomain localhost6 localhost6.localdomain6' >> /etc/hosts"
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe these lines are no longer needed. They were already deleted from other workflow/*.yml files.

@chengfang
Copy link
Contributor

In the integration test log, there is one line indicating that the integration testsuite is cloning jboss-ejb-client:

Executing command git clone -b main --single-branch https://github.com/wildfly/jboss-ejb-client in directory /home/runner/work/jboss-ejb-client/jboss-ejb-client/ejb-client-testsuite/snapshots/target

So the main branch is cloned, which does not contain the changes in the PR that was triggering this test run yet. So looks like the integration testsuite run will always be a step behind.

@tadamski
Copy link
Contributor Author

@chengfang thanks for the review - I have fixed all the mentioned issues; I have also update the build script so that the testsuite is build in two steps; this is required after merging Marek's bom PR


cd ejb-client-testsuite

mvn -B -ntp package -DspecificModule=prepare --batch-mode -Dejb.client.repository=https://github.com/${EJB_CLIENT_REPOSITORY} -Dejb.client.branch=${EJB_CLIENT_BRANCH}
Copy link
Contributor

Choose a reason for hiding this comment

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

--batch-mode is the same as -B, which is already in this command.

cd ejb-client-testsuite

mvn -B -ntp package -DspecificModule=prepare --batch-mode -Dejb.client.repository=https://github.com/${EJB_CLIENT_REPOSITORY} -Dejb.client.branch=${EJB_CLIENT_BRANCH}
mvn -B -ntp dependency:tree clean verify --fail-at-end --batch-mode
Copy link
Contributor

Choose a reason for hiding this comment

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

we should be able to remove --batch-mode

@chengfang
Copy link
Contributor

chengfang commented Jul 18, 2023

the integration test job failed, with errors like the below (there may be other errors):

Executing command git clone -b EJBCLIENT-505 --depth=1 --single-branch https://github.com/wildfly/jboss-ejb-client jboss-ejb-client in directory /home/runner/work/jboss-ejb-client/jboss-ejb-client/ejb-client-testsuite/snapshots/target
Cloning into 'jboss-ejb-client'...
warning: Could not find remote branch EJBCLIENT-505 to clone.
fatal: Remote branch EJBCLIENT-505 not found in upstream origin

So the branch the test is trying to clone is only available in the PR sender's fork, not in the upstream repo yet.

@tadamski tadamski force-pushed the EJBCLIENT-505 branch 2 times, most recently from 6b7af67 to 6d96a68 Compare July 21, 2023 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants