Skip to content

Commit

Permalink
Merge pull request #2 from edeandrea/add-simple-automation
Browse files Browse the repository at this point in the history
Adding some simple automation
  • Loading branch information
danieloh30 authored Mar 28, 2024
2 parents 08161ae + f16b511 commit 300eec2
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 22 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build and test

on:
push:
branches:
- main
pull_request:
branches:
- main

concurrency:
group: "workflow = ${{ github.workflow }}, ref = ${{ github.event.ref }}, pr = ${{ github.event.pull_request.id }}"
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
build-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java:
- '17'
- '21'
project:
- orders
- inventory
- gateway
name: "build-test-${{ matrix.project.name }}-${{ matrix.java }}"
steps:
- uses: actions/checkout@v4

- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: temurin
cache: maven

- name: "build-test-jvm-${{ matrix.project.name }}-java-${{ matrix.java }}"
working-directory: ${{ matrix.project.name }}
run: ./mvnw -B clean verify -Dmaven.compiler.release=${{ matrix.java }}
25 changes: 3 additions & 22 deletions orders/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
<version>2.0.0-SNAPSHOT</version>

<properties>
<maven.compiler.version>3.11.0</maven.compiler.version>
<maven.compiler.version>3.13.0</maven.compiler.version>
<maven.compiler.release>17</maven.compiler.release>
<spring-cloud.bom.version>2021.0.3</spring-cloud.bom.version>
<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
<maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
<spring-boot.version>3.2.4</spring-boot.version>
<dekorate.version>2.11.5.redhat-00017</dekorate.version>
</properties>
Expand Down Expand Up @@ -98,30 +97,12 @@
</dependencies>

<build>
<!-- Used only to replace ${db.name} in index.html with the corresponding Database name -->
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resources/static</directory>
<filtering>true</filtering>
<targetPath>static</targetPath>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
</testResources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.version}</version>
<configuration>
<release>${maven.compiler.release.version}</release>
<release>${maven.compiler.release}</release>
</configuration>
</plugin>
<plugin>
Expand Down

0 comments on commit 300eec2

Please sign in to comment.