forked from OpenLiberty/liberty-tools-intellij
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoided if condition check and added exclude
- Loading branch information
1 parent
b16c0cb
commit 6d9b2a9
Showing
1 changed file
with
16 additions
and
26 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 |
---|---|---|
|
@@ -50,69 +50,60 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
runtime: [ linux, mac, windows ] | ||
include: | ||
- runtime: linux | ||
os: ubuntu-latest | ||
reportName: linux-test-report | ||
# Adding a check on macOS and Windows to verify if 'refLTITag' is equal to '24.0.9'. The value of 'excludeFromBuild' is used to determine whether the steps below need to be executed. | ||
# This 'excludeFromBuild' variable can be removed once the '24.0.9' version is removed from the 'tag' array of the cron job build. | ||
- runtime: mac | ||
os: macOS-latest | ||
reportName: mac-test-report | ||
excludeFromBuild: ${{ inputs.refLTITag == '24.0.9' }} | ||
- runtime: windows | ||
os: [ ubuntu-latest, macOS-latest, windows-latest ] | ||
is24.0.9: | ||
- ${{ inputs.refLTITag == '24.0.9' }} | ||
exclude: | ||
- is24.0.9: true | ||
os: windows-latest | ||
reportName: windows-test-report | ||
excludeFromBuild: ${{ inputs.refLTITag == '24.0.9' }} | ||
- is24.0.9: true | ||
os: macOS-latest | ||
|
||
env: | ||
USE_LOCAL_PLUGIN: ${{ inputs.useLocalPlugin || false }} | ||
REF_LSP4IJ: ${{ inputs.refLsp4ij }} | ||
LSP4IJ_BRANCH: ${{ inputs.lsp4ijBranch || 'default' }} | ||
REF_LTI_TAG: ${{ inputs.refLTITag }} | ||
steps: | ||
- name: Configure pagefile | ||
if: ${{ contains(matrix.os, 'windows') && !matrix.excludeFromBuild }} | ||
if: contains(matrix.os, 'windows') | ||
uses: al-cheb/[email protected] | ||
with: | ||
minimum-size: 8GB | ||
maximum-size: 10GB | ||
disk-root: "C:" | ||
- name: 'Checkout liberty-tools-intellij' | ||
if: ${{ !matrix.excludeFromBuild }} | ||
uses: actions/checkout@v4 | ||
with: | ||
path: liberty-tools-intellij | ||
ref: ${{ env.REF_LTI_TAG }} | ||
- name: 'Install required integration test software' | ||
if: ${{ !matrix.excludeFromBuild }} | ||
working-directory: ./liberty-tools-intellij | ||
run: bash ./src/test/resources/ci/scripts/setup.sh | ||
|
||
# Checkout and build lsp4ij only if USE_LOCAL_PLUGIN is true | ||
- name: 'Checkout lsp4ij' | ||
if: ${{ inputs.useLocalPlugin == true && !matrix.excludeFromBuild }} | ||
if: ${{ inputs.useLocalPlugin == true }} | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: redhat-developer/lsp4ij | ||
path: lsp4ij | ||
ref: ${{ env.REF_LSP4IJ }} | ||
- name: 'Build Lsp4ij' | ||
if: ${{ inputs.useLocalPlugin == true && !matrix.excludeFromBuild }} | ||
if: ${{ inputs.useLocalPlugin == true }} | ||
working-directory: ./lsp4ij | ||
run: bash ./gradlew buildPlugin | ||
- name: 'Unzip lsp4ij file' | ||
if: ${{ inputs.useLocalPlugin == true && !matrix.excludeFromBuild }} | ||
if: ${{ inputs.useLocalPlugin == true }} | ||
working-directory: ./lsp4ij/build/distributions | ||
run: | | ||
unzip -o '*.zip' -d . | ||
- name: 'Build Liberty-Tools-Intellij' | ||
if: ${{ !matrix.excludeFromBuild }} | ||
working-directory: ./liberty-tools-intellij | ||
run: bash ./gradlew buildPlugin -PuseLocal=${{ env.USE_LOCAL_PLUGIN }} | ||
- name: 'Archive artifacts' | ||
if: ${{ (runner.os == 'Linux' && !failure()) && !matrix.excludeFromBuild }} | ||
if: ${{ runner.os == 'Linux' && !failure() }} | ||
uses: actions/[email protected] | ||
with: | ||
name: liberty-tools-intellij-LTI-${{ env.REF_LTI_TAG || 'default' }}-LSP4IJ-${{ env.LSP4IJ_BRANCH }} | ||
|
@@ -122,14 +113,13 @@ jobs: | |
if-no-files-found: warn | ||
retention-days: 7 | ||
- name: 'Run UI integration tests' | ||
if: ${{ !matrix.excludeFromBuild }} | ||
id: run_tests | ||
working-directory: ./liberty-tools-intellij | ||
run: bash ./src/test/resources/ci/scripts/run.sh | ||
- name: 'Archive Test logs and reports' | ||
if: ${{ (failure() && steps.run_tests.conclusion == 'failure') && !matrix.excludeFromBuild }} | ||
if: ${{ failure() && steps.run_tests.conclusion == 'failure' }} | ||
uses: actions/[email protected] | ||
with: | ||
name: ${{ matrix.reportName }}-LTI-${{ env.REF_LTI_TAG || 'default' }}-LSP4IJ-${{ env.LSP4IJ_BRANCH }} | ||
name: ${{ matrix.os }}-test-report-LTI-${{ env.REF_LTI_TAG || 'default' }}-LSP4IJ-${{ env.LSP4IJ_BRANCH }} | ||
path: | | ||
liberty-tools-intellij/build/reports/ | ||
liberty-tools-intellij/build/reports/ |