Merge pull request #55 from phip1611/dependabot/maven/org.springframe… #192
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
name: Build | |
on: [ push, pull_request, merge_group ] | |
jobs: | |
build_regular_java_minimum: | |
name: build (regular, minimum Java version) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Install webp converter | |
run: sudo apt-get update && sudo apt-get install webp | |
- name: Maven Build | |
run: mvn --batch-mode --update-snapshots package | |
- name: Unit Tests | |
run: mvn --batch-mode --update-snapshots test | |
- name: Integration Tests | |
run: mvn --batch-mode --update-snapshots integration-test | |
- name: Upload Maven Artifacts of Spring Service | |
uses: actions/upload-artifact@v4 | |
with: | |
name: service-maven-artifacts | |
path: img-to-webp-service/target | |
# Todo currently makes mostly no sense, but soon this tests Java 22 | |
build_regular_java_latest: | |
name: build (regular, latest Java version) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Install webp converter | |
run: sudo apt-get update && sudo apt-get install webp | |
- name: Maven Build | |
run: mvn --batch-mode --update-snapshots package | |
- name: Unit Tests | |
run: mvn --batch-mode --update-snapshots test | |
- name: Integration Tests | |
run: mvn --batch-mode --update-snapshots integration-test | |
build_docker: | |
runs-on: ubuntu-latest | |
name: build (docker image) | |
needs: | |
- build_regular_java_minimum | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download Maven Artifacts of Spring Service | |
uses: actions/download-artifact@v4 | |
with: | |
name: service-maven-artifacts | |
path: img-to-webp-service/target | |
- run: ./build-docker.sh --ci | |
build_nix: | |
name: build (Nix) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@V27 | |
- uses: DeterminateSystems/magic-nix-cache-action@main | |
- run: nix build .#\jar | |
- run: nix build .#\serviceScript | |
- run: nix build .#\serviceScriptBin | |
- run: nix build .#\dockerImage | |
- run: nix flake check |