Skip to content

Commit

Permalink
Test uploading jar files and downloading to build the images wihout r…
Browse files Browse the repository at this point in the history
…e-packaging
  • Loading branch information
groldan committed Oct 12, 2024
1 parent 6591736 commit 89dc052
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 9 deletions.
27 changes: 23 additions & 4 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,21 @@ jobs:
cache: 'maven'

- name: Validate source code formatting
run: make lint
run: |
make lint
- name: Test
run: |
#make test
echo "skipping to test the acceptance job"
# `make test` runs mvn verify, which includes mvn package, so no need to run `package` separatedly for the upload step below
make test
- name: Upload application jar files
uses: actions/upload-artifact@v4
with:
name: application-jars
path: ./**/target/*-bin.jar
retention-days: 1
compression-level: 0 # no compression

acceptance:
name: Acceptance Tests
Expand All @@ -67,9 +76,19 @@ jobs:
java-version: '21'
cache: 'maven'

- name: Download application jar files
uses: actions/download-artifact@v4
with:
name: application-jars
path: .

- name: Copy config directory
# during the validate phase, the config/ dir is copied to each app's target/config
run: ./mvnw validate -ntp -T1C

- name: Build images
# REPACKAGE=false avoids to re-package the apps during build-image
run: REPACKAGE=false make package build-image
run: REPACKAGE=false make build-image

- name: Install CI dependencies
run: python3 -m pip install --user --requirement=ci/requirements.txt
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ clean:

.PHONY: lint
lint:
./mvnw fmt:check sortpom:verify -Dsort.verifyFailOn=strict -Dsort.verifyFail=stop -ntp
./mvnw fmt:check sortpom:verify -Dsort.verifyFailOn=strict -Dsort.verifyFail=stop -ntp -T1C

.PHONY: format
format:
./mvnw sortpom:sort fmt:format -ntp
./mvnw sortpom:sort fmt:format -ntp -T1C

.PHONY: install
install:
./mvnw clean install -DskipTests -ntp -T4 -U
./mvnw clean install -DskipTests -ntp -U -T1C

.PHONY: package
package:
./mvnw clean package -DskipTests -ntp -T4 -U
./mvnw clean package -DskipTests -ntp -U -T1C

.PHONY: test
test:
./mvnw verify -ntp -T4
./mvnw verify -ntp -T1C

.PHONY: build-image
build-image: build-base-images build-image-infrastructure build-image-geoserver
Expand Down

0 comments on commit 89dc052

Please sign in to comment.