forked from camel-tooling/camel-dap-client-vscode
-
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.
- Loading branch information
Showing
12 changed files
with
318 additions
and
9 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 |
---|---|---|
@@ -0,0 +1,126 @@ | ||
name: Camel Version CI | ||
|
||
on: | ||
push: | ||
branches: [ main, FUSETOOLS2-2200 ] | ||
pull_request: | ||
branches: [ main ] # TODO: only this will remain, push is to delete! | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
camel: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ ubuntu-latest, macos-13, windows-latest ] | ||
camel-version: [ "4.0.0", "4.0.0.redhat-00031" ] | ||
timeout-minutes: 25 # not in LSP but I think this should match Main pipeline | ||
|
||
env: | ||
CODE_VERSION: max | ||
CODE_TYPE: stable | ||
TEST_RESOURCES: test-resources | ||
CAMEL_VERSION: ${{ matrix.camel-version }} | ||
|
||
runs-on: ${{ matrix.os }} | ||
name: ${{ matrix.camel-version }} / ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 17 | ||
distribution: "temurin" | ||
|
||
# Test Java? | ||
|
||
- name: Install JBang (ubuntu, macOS) | ||
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-13' | ||
run: | | ||
curl -Ls https://sh.jbang.dev | bash -s - app setup | ||
echo "$HOME/.jbang/bin" >> $GITHUB_PATH | ||
- name: Install JBang (windows) | ||
if: matrix.os == 'windows-latest' | ||
run: choco install jbang | ||
|
||
- name: Setup JBang (trusted sources) | ||
run: jbang trust add https://github.com/apache/ | ||
|
||
# name? | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "18.15.x" | ||
cache: "npm" | ||
|
||
# setup vsce? | ||
|
||
- name: Install global dependencies | ||
run: npm install -g typescript @vscode/vsce | ||
|
||
- name: npm-ci | ||
run: npm ci | ||
|
||
- name: ui test (ubuntu) | ||
id: uiTest_Ubuntu | ||
if: matrix.os == 'ubuntu-latest' | ||
run: xvfb-run --auto-servernum npm run ui-test | ||
|
||
- name: ui test (macos, windows) | ||
id: uiTest_MacOS_Windows | ||
if: matrix.os != 'ubuntu-latest' | ||
run: npm run ui-test | ||
|
||
# - name: vsce package | ||
# run: vsce package | ||
|
||
# - name: Store UI test log | ||
# uses: actions/upload-artifact@v4 | ||
# if: | | ||
# (failure() || cancelled()) && | ||
# (steps.uiTest_Ubuntu.outcome == 'failure' || | ||
# steps.uiTest_MacOS_Windows.outcome == 'failure' || | ||
# steps.uiTest_Ubuntu.outcome == 'cancelled' || | ||
# steps.uiTest_MacOS_Windows.outcome == 'cancelled') | ||
# with: | ||
# name: ${{ matrix.os }}-${{ matrix.version }}-ui-test-logs | ||
# path: test-resources/settings/logs/* | ||
|
||
# - name: Store UI Test Screenshots | ||
# uses: actions/upload-artifact@v4 | ||
# if: | | ||
# (failure() || cancelled()) && | ||
# (steps.uiTest_Ubuntu.outcome == 'failure' || | ||
# steps.uiTest_MacOS_Windows.outcome == 'failure' || | ||
# steps.uiTest_Ubuntu.outcome == 'cancelled' || | ||
# steps.uiTest_MacOS_Windows.outcome == 'cancelled') | ||
# with: | ||
# name: ${{ matrix.os }}-${{ matrix.version }}-ui-test-screenshots | ||
# path: test-resources/screenshots/*.png | ||
|
||
check: | ||
if: always() | ||
runs-on: ubuntu-latest | ||
name: Status Check | ||
needs: [ camel ] | ||
steps: | ||
- name: Test Matrix Result | ||
run: | | ||
echo result = ${{ needs.camel.result }} | ||
- name: Status Check - success | ||
if: ${{ needs.camel.result == 'success' }} | ||
run: | | ||
echo "All tests successfully completed!" | ||
exit 0 | ||
- name: Status Check - failure | ||
if: ${{ needs.camel.result != 'success' }} | ||
run: | | ||
echo "Status Check failed!" | ||
exit 1 |
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
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License", destination); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
import { assert } from "chai"; | ||
import { CATALOG_VERSION_ID, readUserSetting } from "../utils"; | ||
|
||
describe('Camel version', function () { | ||
this.timeout(15000); | ||
|
||
const testDescription = process.env.CAMEL_VERSION ? `Check actual version is ${process.env.CAMEL_VERSION}` : 'Nothing to check'; | ||
|
||
it(testDescription, async function () { | ||
|
||
if (process.env.CAMEL_VERSION === undefined || process.env.CAMEL_VERSION === null || process.env.CAMEL_VERSION.length === 0) { | ||
this.skip(); | ||
} | ||
|
||
assert.equal(readUserSetting(CATALOG_VERSION_ID), process.env.CAMEL_VERSION); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/** | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License", destination); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
import { | ||
CATALOG_VERSION_ID, | ||
readUserSetting, | ||
setUserSettingsDirectly, | ||
} from '../utils'; | ||
import { assert } from 'chai'; | ||
|
||
describe('Camel version', function () { | ||
this.timeout(15000); | ||
|
||
const testDescription = process.env.CAMEL_VERSION ? `Set ${process.env.CAMEL_VERSION}` : 'Use default'; | ||
|
||
it(testDescription, async function () { | ||
// no env variable set or is empty | ||
if (process.env.CAMEL_VERSION === undefined || process.env.CAMEL_VERSION === null || process.env.CAMEL_VERSION.length === 0) { | ||
this.skip(); | ||
} | ||
|
||
// set version directly | ||
setUserSettingsDirectly(CATALOG_VERSION_ID, process.env.CAMEL_VERSION); | ||
|
||
// check if version was set | ||
assert.equal(readUserSetting(CATALOG_VERSION_ID), process.env.CAMEL_VERSION); | ||
}); | ||
}); |
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
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
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
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
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
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
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
Oops, something went wrong.