OpenLiberty / liberty-tools-intellij

IntelliJ IDEA extension for Liberty
https://plugins.jetbrains.com/plugin/14856-open-liberty-tools
Eclipse Public License 2.0
12 stars 24 forks source link

Determine Parameterization for Running the LTI Build #783

Closed anusreelakshmi934 closed 3 months ago

anusreelakshmi934 commented 4 months ago

Determine how to run the LTI build by using

anusreelakshmi934 commented 4 months ago

Planning on running a CronJob which checkouts the main branch of lsp4ij repo and runs the LTI tests. Added an env variable USE_LOCAL_PLUGIN which is set to true or false in the workflow file. In cronJob.yamlfile it is set to true, so that it builds plugin locally while in build.yaml file it is set to false, so it builds plugin from the marketplace. The tasks in src/test/resources/ci/scripts/run.sh is also modified accordingly. Attaching the reference branch - https://github.com/anusreelakshmi934/liberty-tools-intellij/tree/issue%23783

anusreelakshmi934 commented 3 months ago

Modified to use a single workflow file. Added an input parameter ( useLocalPlugin ) for workflow_dispatch to decide whether to use the local lsp4ij build. Used if conditions to include steps for checking out and building lsp4ij only if USE_LOCAL_PLUGIN is true. Attaching the branch - https://github.com/anusreelakshmi934/liberty-tools-intellij/tree/parameterizeIssue%23783

anusreelakshmi934 commented 3 months ago

I also tested if the workflow fails when there are errors in the checked-out lsp4ij repository that cause our UI tests to fail. To do this, I purposefully commented out some code in my fork of the lsp4ij repo. This caused the UI tests to fail, confirming that the workflow is running tests from the checked-out repository specified in the workflow file.

For reference, here is the branch where I made the changes: testingFailure. I ran two builds: one using the lsp4ij plugin built locally ( USE_LOCAL_PLUGIN: true ) and the other with the lsp4ij plugin from the marketplace ( USE_LOCAL_PLUGIN: false ). In the case of the locally built plugin, the tests failed, confirming the workflow is correctly running tests by checking out the specified repo in the workflow file.