Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
charphi committed Sep 3, 2024
2 parents cf9c886 + d7e8248 commit ceb5e5c
Show file tree
Hide file tree
Showing 25 changed files with 1,124 additions and 219 deletions.
25 changes: 0 additions & 25 deletions .dependabot/config.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: maven
target-branch: "develop"
directory: "/"
schedule:
interval: "weekly"
day: "saturday"
open-pull-requests-limit: 10
ignore:
- dependency-name: "eu.europa.ec.joinup.sat:*"
- package-ecosystem: "github-actions"
target-branch: "develop"
directory: "/"
schedule:
interval: "daily"
40 changes: 40 additions & 0 deletions .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Check links in documentation

on:
push:
paths:
- '.github/workflows/check-links.yml'
- 'lychee.toml'
- '**/*.md'
schedule:
# Run on the first of each month at 9:00 AM
- cron: "0 9 1 * *"
workflow_dispatch:

concurrency:
group: "${{ github.workflow }}-${{ github.head_ref }}"
cancel-in-progress: true

jobs:
lychee:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Restore lychee cache
uses: actions/cache@v4
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-

- name: Check links
id: lychee
uses: lycheeverse/[email protected]
with:
fail: true
args: --max-concurrency 1 --cache --no-progress --exclude-all-private './**/*.md'
67 changes: 67 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ develop ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ develop ]
schedule:
- cron: '20 18 * * 2'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: [ 'java' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
33 changes: 33 additions & 0 deletions .github/workflows/heylogs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Heylogs

on: [ push ]

jobs:
badge-job:
if: startsWith(github.repository, 'nbbrd/') && startsWith(github.ref, 'refs/heads/develop')
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
cache: 'maven'

- name: Scan changelog
run: mvn -B -ntp -U com.github.nbbrd.heylogs:heylogs-maven-plugin::scan -Dheylogs.output.file=scan.json -Dheylogs.format.id=json

- name: Create badges endpoint json
run: |
mkdir heylogs
jq '{schemaVersion: 1, label: "unreleased changes", message: "#\(.[0].summary.unreleasedChanges)", color: "E05735", logoColor: "white", namedLogo: "keepachangelog"}' scan.json > heylogs/unreleased-changes.json
- name: Deploy badges endpoint json
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: badges
publish_dir: ./heylogs
37 changes: 37 additions & 0 deletions .github/workflows/java-ea-maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Java-EA with Maven

on:
push:
branches:
- develop
workflow_dispatch:

jobs:
build-and-test-job:
strategy:
fail-fast: false
matrix:
java: [ 21 ]
os: [ ubuntu-latest, macos-latest ]

name: JDK${{ matrix.java }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

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

- name: Build and (headless) test with Maven
uses: smithki/[email protected]
with:
run: mvn -U -B -ntp verify
164 changes: 164 additions & 0 deletions .github/workflows/java8-maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
name: Java8+ with Maven

on: [ push, pull_request ]

jobs:
build-and-test-job:
if: github.event_name == 'pull_request' || startsWith(github.ref, 'refs/heads/develop') || startsWith(github.ref, 'refs/tags/v')
strategy:
fail-fast: false
matrix:
java: [ 8, 21 ]
os: [ ubuntu-latest, macos-13, windows-latest ]

name: JDK${{ matrix.java }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

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

- name: Pre-download dependencies with Maven
uses: nick-fields/retry@v3
with:
command: mvn -U -B -ntp dependency:go-offline
max_attempts: 3
timeout_minutes: 5

- name: Build and (headless) test with Maven
uses: smithki/[email protected]
with:
run: mvn -U -B -ntp verify

auto-merge-job:
needs: build-and-test-job
if: startsWith(github.repository, 'nbbrd/') && github.event_name == 'pull_request' && github.actor == 'dependabot[bot]'
permissions:
contents: write
pull-requests: write

name: Auto-merge on dependabot PR
runs-on: ubuntu-latest

steps:
- name: Merge PR
uses: nick-fields/retry@v3
with:
command: gh pr merge --auto --rebase "$PR_URL"
max_attempts: 3
timeout_minutes: 5
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

snapshot-job:
needs: build-and-test-job
if: startsWith(github.repository, 'nbbrd/') && startsWith(github.ref, 'refs/heads/develop')
strategy:
matrix:
java: [ 21 ]
os: [ ubuntu-latest ]

name: Snapshot on develop
runs-on: ${{ matrix.os }}

steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

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

- name: Deploy snapshot with Maven if settings defined
run: test ! -f ci.settings.xml || mvn -B -ntp deploy -DskipTests -s ci.settings.xml -P base-deploy,snapshot-deploy,!non-deployable-modules
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
SIGN_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
SIGN_KEY_PASS: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

- name: Dryrun release assets with Maven
run: mvn -B -ntp install -DskipTests -P full-release -Djreleaser.output.directory=$PWD/out/jreleaser -Djreleaser.dry.run
env:
JRELEASER_GITHUB_TOKEN: ${{ secrets.JRELEASER_GITHUB_TOKEN }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.MAVEN_GPG_PUBLIC_KEY }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

- name: Upload JReleaser output
if: always()
uses: actions/upload-artifact@v4
with:
name: assets-snapshot-log
path: |
out/jreleaser/trace.log
out/jreleaser/output.properties
release-job:
needs: build-and-test-job
if: startsWith(github.repository, 'nbbrd/') && startsWith(github.ref, 'refs/tags/v')
strategy:
matrix:
java: [ 21 ]
os: [ ubuntu-latest ]

name: Release on tag
runs-on: ${{ matrix.os }}

steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

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

- name: Deploy with Maven if settings defined
run: test ! -f ci.settings.xml || mvn -B -ntp deploy -DskipTests -s ci.settings.xml -P base-deploy,release-deploy,!non-deployable-modules
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
SIGN_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
SIGN_KEY_PASS: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
# Fix https://issues.sonatype.org/browse/OSSRH-66257
MAVEN_OPTS: "--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED"

- name: Release assets with Maven
run: mvn -B -ntp install -DskipTests -P full-release -Djreleaser.output.directory=$PWD/out/jreleaser
env:
JRELEASER_GITHUB_TOKEN: ${{ secrets.JRELEASER_GITHUB_TOKEN }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.MAVEN_GPG_PUBLIC_KEY }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

- name: Upload JReleaser output
if: always()
uses: actions/upload-artifact@v4
with:
name: assets-release-log
path: |
out/jreleaser/trace.log
out/jreleaser/output.properties
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/demetra-sas-core/target/
/demetra-sas-desktop/target/
target/
Loading

0 comments on commit ceb5e5c

Please sign in to comment.