-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add listener * update listener * inventory listener update * edit minor part * test case update * update inventory test 2 * 3 test cases * EndpointIT * test.sh * update test.sh * testApp.sh * testApp.sh final * delete scripts * test.yml updates
- Loading branch information
Showing
6 changed files
with
104 additions
and
69 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,75 @@ | ||
name: Test application | ||
|
||
on: | ||
pull_request: | ||
branches: [ prod, staging, draft ] | ||
|
||
jobs: | ||
check-files: | ||
if: ${{ github.event_name == 'pull_request' }} | ||
runs-on: ubuntu-latest | ||
outputs: | ||
canSkip: ${{ steps.Checker.outputs.canSkip }} | ||
steps: | ||
- name: Get files | ||
uses: actions/checkout@v2 | ||
- name: Get tools | ||
uses: actions/checkout@v2 | ||
with: | ||
path: tools/ | ||
repository: openliberty/guides-common | ||
- id: Checker | ||
shell: bash | ||
run: bash ./tools/pr-checker/checker.sh ${{ github.repository }} ${{ github.event.pull_request.number }} | tee checker.log | ||
- id: Lint-Code-Base | ||
if: "! github.event.pull_request.head.repo.fork" | ||
uses: github/super-linter@latest | ||
env: | ||
VALIDATE_ALL_CODEBASE: false | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
LINTER_RULES_PATH: ./tools/pr-checker/linters/ | ||
DEFAULT_BRANCH: draft | ||
- name: Summary | ||
if: "! github.event.pull_request.head.repo.fork" | ||
run: | | ||
< ./checker.log tail -n +2; echo "====== Super Linter ======" | ||
< ./super-linter.log sed -n '/.*The script has completed.*/,$p' | tail -n +4 | sed 's/.*\(\[[A-Z]\+\]\)/\1/' | ||
echo "====== Examine logs in Checker and Super-Linter steps for more details ======" | ||
if [ '${{ steps.Checker.outcome }}' != 'success' ] || [ '${{ steps.Lint-Code-Base.outcome }}' != 'success' ]; then exit 1; fi | ||
test-app: | ||
runs-on: ubuntu-latest | ||
needs: [check-files] | ||
if: "!contains(needs.check-files.outputs.canSkip, 'true')" | ||
defaults: | ||
run: | ||
working-directory: finish | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- run: unset _JAVA_OPTIONS | ||
- name: Run tests | ||
run: | | ||
chmod +x ../scripts/testApp.sh | ||
sudo ../scripts/testApp.sh | ||
- name: Post tests | ||
if: always() | ||
run: | | ||
logsPath=$(sudo find . -name "console.log" | grep inventory); | ||
sudo cat "$logsPath" | sudo grep Launching | ||
logsPath=$(sudo find . -name "console.log" | grep system); | ||
sudo cat "$logsPath" | sudo grep Launching | ||
- name: Archive finish inventory logs if failed | ||
if: failure() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: finish-inventory-logs | ||
path: finish/inventory/target/liberty/wlp/usr/servers/defaultServer/logs/ | ||
- name: Archive finish system logs if failed | ||
if: failure() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: finish-system-logs | ||
path: finish/system/target/liberty/wlp/usr/servers/defaultServer/logs/ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,29 @@ | ||
#!/bin/bash | ||
set -euxo pipefail | ||
|
||
mvn -pl models clean install | ||
|
||
mvn -ntp -Dhttp.keepAlive=false \ | ||
-Dmaven.wagon.http.pool=false \ | ||
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120 \ | ||
-pl system -q clean package liberty:create liberty:install-feature liberty:deploy | ||
|
||
mvn -ntp -Dhttp.keepAlive=false \ | ||
-Dmaven.wagon.http.pool=false \ | ||
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120 \ | ||
-pl inventory -q clean package liberty:create liberty:install-feature liberty:deploy | ||
|
||
mvn -ntp -pl inventory liberty:start | ||
sleep 10 | ||
mvn -ntp -pl system liberty:start | ||
sleep 15 | ||
|
||
mvn -ntp -Dhttp.keepAlive=false \ | ||
-Dmaven.wagon.http.pool=false \ | ||
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120 \ | ||
-pl inventory failsafe:integration-test | ||
|
||
mvn -ntp -pl inventory failsafe:verify | ||
|
||
mvn -pl system liberty:stop | ||
mvn -pl inventory liberty:stop |