Skip to content

Commit

Permalink
Add Build Job
Browse files Browse the repository at this point in the history
  • Loading branch information
knoppiks committed Jul 11, 2024
1 parent 865e132 commit d3a2eb8
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 15 deletions.
41 changes: 38 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ on:
pull_request:
branches: [ "main" ]

env:
MAVEN_ARGS: -B -T1C -Dmockserver.logLevel=WARN

jobs:
analyze:
env:
GITHUB_TOKEN: ${{ github.token }}
permissions:
security-events: write
runs-on: ubuntu-24.04
Expand All @@ -29,9 +34,39 @@ jobs:
queries: security-and-quality

- name: Build
run: mvn -B compile
env:
GITHUB_TOKEN: ${{ github.token }}
run: make build

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3

build:
env:
GITHUB_TOKEN: ${{ github.token }}
runs-on: ubuntu-24.04
strategy:
matrix:
agent:
- clinical-domain-agent
- trust-center-agent
- research-domain-agent
steps:
- uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
cache: 'maven'

- name: Build Dependencies
run: make install-dependencies

- name: Unit Tests
run: mvn ${MAVEN_ARGS} test --projects ${{ matrix.agent }}

- name: Integration Tests
run: mvn ${MAVEN_ARGS} verify --projects ${{ matrix.agent }} -DskipTests

- name: Build Agent
run: mvn ${MAVEN_ARGS} install --projects ${{ matrix.agent }} -DskipTests -DskipITs
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ $(AGENTS):
$(MAKE) -C $@ $(MAKECMDGOALS)

clean:
mvn clean
mvn ${MAVEN_ARGS} clean

build:
mvn install -T1C -Dmockserver.logLevel=WARN
mvn ${MAVEN_ARGS} compile -T1C

build-cda:
mvn install -T1C -Dmockserver.logLevel=WARN --projects clinical-domain-agent
test:
mvn ${MAVEN_ARGS} verify

build-rda:
mvn install -T1C -Dmockserver.logLevel=WARN --projects research-domain-agent
install:
mvn ${MAVEN_ARGS} install

build-tca:
mvn install -T1C -Dmockserver.logLevel=WARN --projects trust-center-agent
install-dependencies:
mvn ${MAVEN_ARGS} install --projects .,api,util,test-util,monitoring-util

images:
@for agent in $(AGENTS); do \
Expand Down
5 changes: 4 additions & 1 deletion clinical-domain-agent/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
install:
mvn -B install -T1C -Dmockserver.logLevel=WARN

image: Dockerfile .dockerignore application.yaml target
docker build -t creg.smith.care/fts-next/clinical-domain-agent .

.PHONY: image
.PHONY: image install
5 changes: 4 additions & 1 deletion research-domain-agent/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
install:
mvn -B install -T1C -Dmockserver.logLevel=WARN

image: Dockerfile .dockerignore application.yaml target
docker build -t creg.smith.care/fts-next/research-domain-agent .

.PHONY: image
.PHONY: image install
5 changes: 3 additions & 2 deletions trust-center-agent/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
build:
install:
mvn -B install -T1C -Dmockserver.logLevel=WARN

image: Dockerfile .dockerignore application.yaml target
docker build -t creg.smith.care/fts-next/trust-center-agent .

.PHONY: image
.PHONY: image install

0 comments on commit d3a2eb8

Please sign in to comment.