-
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.
Adding dependabot and template for GHActions
- Loading branch information
Showing
2 changed files
with
65 additions
and
0 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,11 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: daily | ||
|
||
- package-ecosystem: maven | ||
directory: / | ||
schedule: | ||
interval: daily |
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,54 @@ | ||
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time | ||
# For more information see: https://docs.github.com/actions/automating-builds-and-tests/building-and-testing-java-with-maven | ||
|
||
name: Java CI with Maven on Pull | ||
|
||
on: | ||
#pull_request: TODO enable after test passes | ||
# branches: [ "main" ] | ||
push: | ||
branches: [ "actions"] #Allows testing Actions changes in a fork | ||
#schedule: TODO enable after test passes | ||
#- cron: "0 12 * * 1-5" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
#services: TODO add couchdb container for testing | ||
|
||
|
||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 # v4.3.0 | ||
with: | ||
java-version: 21 | ||
distribution: 'temurin' | ||
cache: maven | ||
- name: Compile App and Tests | ||
run: | | ||
mvn -B compiler:compile | ||
mvn -B compiler:testCompile | ||
- name: Create Server and Deploy App | ||
run: | | ||
mvn -B liberty:create | ||
mvn -B liberty:deploy | ||
- name: Start Server | ||
run: mvn -B liberty:start | ||
- name: Run Integration Tests | ||
run: mvn -B failsafe:integration-test | ||
- name: Stop Server | ||
run: mvn -B liberty:stop | ||
- name: Verify Integration Test Results | ||
run: mvn -B failsafe:verify | ||
- name: Archive Liberty logs | ||
if: ${{ failure() }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: liberty-logs | ||
path: target/liberty/wlp/usr/servers/CloudantServer/logs/ | ||
retention-days: 1 |