Skip to content

Commit

Permalink
Update build scripts, dependabot (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
jodastephen authored Aug 24, 2022
1 parent b5df7bd commit c38aa7b
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 16 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Dependabot config

version: 2
updates:
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: weekly
time: "02:30"
open-pull-requests-limit: 20
2 changes: 1 addition & 1 deletion .github/website.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ cp -R ../site joda-convert/
echo "## update..."
git add -A
git status
git commit --message "Update joda-beans from CI: $GITHUB_ACTION"
git commit --message "Update joda-convert from CI: $GITHUB_ACTION"

echo "## push..."
git push origin main
Expand Down
27 changes: 14 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,38 @@ on:
tags:
- 'v*'
- 'website*'
pull_request:
pull_request_target:
branches:
- 'main'
- '*'

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [1.8, 11]
java: [8, 11]

steps:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b #v3.0.2

- name: Set up JDK
uses: actions/setup-java@v1
uses: actions/setup-java@2c7a4878f5d120bd643426d54ae1209b29cc01a3 #v3.4.1
with:
java-version: ${{ matrix.java }}
- name: Checkout
uses: actions/checkout@v2
- name: Maven cache
uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ matrix.java }}-${{ hashFiles('**/pom.xml') }}-${{ hashFiles('.github/workflows/build.yml') }}
restore-keys: |
${{ runner.os }}-maven-
distribution: 'temurin'
cache: 'maven'

- name: Maven version
run: |
mkdir -p ./.mvn
echo '-e -B -DtrimStackTrace=false' > ./.mvn/maven.config
mvn --version
mkdir -p target
- name: Maven build
run: |
mvn install site
Expand Down
24 changes: 22 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>org.joda</groupId>
<artifactId>joda-parent</artifactId>
<version>1.4.0</version>
<version>1.4.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>joda-convert</artifactId>
Expand Down Expand Up @@ -52,6 +52,26 @@
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
<!-- Enforce Maven 3.6.0 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>3.6.0</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<!-- Setup surefire to test with Guava not present -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -92,7 +112,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>31.0.1-jre</version>
<version>31.1-jre</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down

0 comments on commit c38aa7b

Please sign in to comment.