Skip to content

test: modernize pdfbox test (#420) #335

test: modernize pdfbox test (#420)

test: modernize pdfbox test (#420) #335

Workflow file for this run

name: "Chiselled Ubuntu 'jre' Tests"
on:
pull_request:
push:
env:
image-name: ubuntu/jre:test
build-image-name: temurin-jdk17-builder:test
maven-image-name: temurin-jdk17-maven:test
maven-image-base: maven:3.9.1-eclipse-temurin-17
jobs:
build:
runs-on: ubuntu-22.04
name: Build and Test
strategy:
fail-fast: false
matrix:
ubuntu-release: ["22.04"]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'
- name: Tests Maven cache
uses: actions/cache@v4
with:
path: ${{ runner.temp }}/.m2
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Tests PDFBox
uses: actions/cache@v4
with:
path: tests/pdfbox/pdfbox
key: tests-pdfbox-pdfbox-3.0.0-alpha3
restore-keys: |
tests-pdfbox-pdfbox-3.0.0-alpha3
- name: Tests Petclinic
uses: actions/cache@v4
with:
path: tests/petclinic-test/spring-petclinic
key: tests-petclinic-test-spring-petclinic
restore-keys: |
tests-petclinic-test-spring-petclinic
- name: Build the jre image
run: |
docker build \
-t ${{ env.image-name }} \
--build-arg UID=$(id -u ${USER}) \
--build-arg GID=$(id -g ${USER}) \
-f jre/Dockerfile.${{ matrix.ubuntu-release }} \
jre
- name: Build the JDK docker image
run: |
docker build \
-t ${{ env.build-image-name }} \
--build-arg UID=$(id -u ${USER}) \
--build-arg GID=$(id -g ${USER}) \
-f tests/containers/builder/Dockerfile.${{ matrix.ubuntu-release }} \
tests/containers/builder
- name: Build Maven docker image
run: |
docker build \
-t ${{ env.maven-image-name }} \
--build-arg UID=$(id -u ${USER}) \
--build-arg GID=$(id -g ${USER}) \
--build-arg BASE_IMAGE=${{ env.image-name }} \
--build-arg MAVEN_IMAGE=${{ env.maven-image-base }} \
-f tests/containers/maven/Dockerfile.${{ matrix.ubuntu-release }} \
tests/containers/maven
- name: Build benchmark docker images
run: |
cd benchmark && make
- name: Run Tests
working-directory: ${{ github.workspace }}/tests/
run: |
./run-all-tests ${{ env.image-name }} \
${{ env.build-image-name }} \
${{ runner.temp }}/.m2 \
${{ env.maven-image-name }}
multi-arch-build:
runs-on: ubuntu-22.04
name: Multi Architecture Build
strategy:
fail-fast: false
matrix:
ubuntu-release: ["22.04"]
arch: ["amd64", "arm64"]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# Lint the Dockerfiles
- name: Lint the Dockerfile
uses: hadolint/[email protected]
with:
dockerfile: jre/Dockerfile.${{ matrix.ubuntu-release }}
ignore: DL3008,DL3015,SC3028
- name: Build the jre image
run: |
docker buildx build \
--tag=${{ env.image-name }} \
--file=jre/Dockerfile.${{ matrix.ubuntu-release }} \
--platform=linux/${{ matrix.arch }} \
jre