Skip to content

Commit fca2d52

Browse files
committed
Adding Dependabot and actions build
1 parent 21e6f06 commit fca2d52

File tree

2 files changed

+83
-0
lines changed

2 files changed

+83
-0
lines changed

.github/dependabot.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: daily
7+
8+
- package-ecosystem: maven
9+
directory: /
10+
schedule:
11+
interval: daily
12+
13+
- package-ecosystem: docker
14+
directory: /mongo
15+
schedule:
16+
interval: daily

.github/workflows/ci-pull.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2+
# For more information see: https://docs.github.com/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3+
4+
name: Java CI with Maven on Pull
5+
6+
on:
7+
pull_request:
8+
branches: [ "main" ]
9+
push:
10+
branches: [ "actions"] #Allows testing Actions changes in a fork
11+
schedule:
12+
- cron: "0 12 * * 1-5"
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
21+
services:
22+
mongo:
23+
image: mongo:7.0.7
24+
env:
25+
MONGO_INITDB_ROOT_USERNAME: sampleUser
26+
MONGO_INITDB_ROOT_PASSWORD: openliberty
27+
MONGO_INITDB_DATABASE: testdb
28+
# Set health checks to wait until postgres has started
29+
options: >-
30+
--health-cmd "echo 'db.runCommand("ping").ok' | mongosh --quiet"
31+
--health-interval 10s
32+
--health-timeout 5s
33+
--health-retries 5
34+
ports:
35+
- 27017:27017
36+
37+
steps:
38+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
39+
- name: Set up JDK 21
40+
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
41+
with:
42+
java-version: 21
43+
distribution: 'temurin'
44+
cache: maven
45+
- name: Compile App and Tests
46+
run: |
47+
mvn -B compiler:compile
48+
mvn -B compiler:testCompile
49+
- name: Create Server and Deploy App
50+
run: |
51+
mvn -B liberty:create
52+
mvn -B liberty:deploy
53+
- name: Start Server
54+
run: mvn -B liberty:start
55+
- name: Run Integration Tests
56+
run: mvn -B failsafe:integration-test
57+
- name: Stop Server
58+
run: mvn -B liberty:stop
59+
- name: Verify Integration Test Results
60+
run: mvn -B failsafe:verify
61+
- name: Archive Liberty logs
62+
if: ${{ failure() }}
63+
uses: actions/upload-artifact@v4
64+
with:
65+
name: liberty-logs
66+
path: target/liberty/wlp/usr/servers/JakartaConcurrencyServer/logs/
67+
retention-days: 1

0 commit comments

Comments
 (0)