Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .github/workflows/build-on-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ on: push

jobs:
build:
name: Build under Ubuntu
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'true'

- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: 11
java-version: 17
distribution: zulu
cache: gradle

Expand All @@ -23,14 +24,15 @@ jobs:

# See: https://github.com/marketplace/actions/junit-report-action
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3.5.2
uses: mikepenz/action-junit-report@v4.0.3
if: always() # always run even if the previous step fails
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
report_paths: '**/build/test-results/**/TEST-*.xml'
require_tests: true # will fail workflow if test reports not found

- name: Upload code coverage report
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
verbose: true
15 changes: 10 additions & 5 deletions .github/workflows/build-on-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,33 @@ on: pull_request

jobs:
build:
name: Build under Windows
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'true'

- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: 11
java-version: 17
distribution: zulu
cache: gradle

# See: https://github.com/al-cheb/configure-pagefile-action
- name: Configure Pagefile
uses: al-cheb/configure-pagefile-action@v1.3

- name: Build project and run tests
shell: cmd
# For the reason on `--no-daemon` see https://github.com/actions/cache/issues/454
run: gradlew.bat build --stacktrace --no-daemon

# See: https://github.com/marketplace/actions/junit-report-action
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3.5.2
uses: mikepenz/action-junit-report@v4.0.3
if: always() # always run even if the previous step fails
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
report_paths: '**/build/test-results/**/TEST-*.xml'
require_tests: true # will fail workflow if test reports not found
25 changes: 25 additions & 0 deletions .github/workflows/ensure-reports-updated.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Ensures that the license report files were modified in this PR.

name: Ensure license reports updated

on:
pull_request:
branches:
- '**'

jobs:
build:
name: Ensure license reports updated
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
# Configure the checkout of all branches, so that it is possible to run the comparison.
fetch-depth: 0
# Check out the `config` submodule to fetch the required script file.
submodules: true

- name: Check that both `pom.xml` and license report files are modified
shell: bash
run: chmod +x ./config/scripts/ensure-reports-updated.sh && ./config/scripts/ensure-reports-updated.sh
6 changes: 3 additions & 3 deletions .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ on:

jobs:
validation:
name: Validation
name: Gradle Wrapper Validation
runs-on: ubuntu-latest
steps:
- name: Checkout latest code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
uses: gradle/actions/wrapper-validation@v4
7 changes: 4 additions & 3 deletions .github/workflows/increment-guard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@ on:

jobs:
build:
name: Check version increment
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'true'

- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: 11
java-version: 17
distribution: zulu
cache: gradle

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'true'

- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: 11
java-version: 17
distribution: zulu
cache: gradle

Expand Down
73 changes: 73 additions & 0 deletions .github/workflows/remove-obsolete-artifacts-from-packages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#
# Periodically removes obsolete artifacts from GitHub Packages.
#
# Only non-release artifacts—those containing "SNAPSHOT" in their version name—are eligible
# for removal. The latest non-release artifacts will be retained, with the exact number determined
# by the `VERSION_COUNT_TO_KEEP` environment variable.
#
# Please note the following details:
#
# 1. An artifact cannot be deleted if it is public and has been downloaded more than 5,000 times.
# In this scenario, contact GitHub support for further assistance.
#
# 2. This workflow only applies to artifacts published from this repository.
#
# 3. A maximum of 100 artifacts can be removed per run from each package;
# if there are more than 100 obsolete artifacts, either manually restart the workflow
# or wait for the next scheduled removal.
#
# 4. When artifacts with version `x.x.x-SNAPSHOT` are published, GitHub automatically appends
# the current timestamp, resulting in versions like `x.x.x-SNAPSHOT.20241024.173759`.
# All such artifacts are grouped into one package and treated as a single package
# in GitHub Packages with the version `x.x.x-SNAPSHOT`. Consequently, it is not possible
# to remove obsolete versions within a package; only the entire package can be deleted.
#

name: Remove obsolete Maven artifacts from GitHub Packages

on:
schedule:
- cron: '0 0 * * *' # Run every day at midnight.

env:
VERSION_COUNT_TO_KEEP: 5 # Number of most recent SNAPSHOT versions to retain.

jobs:
retrieve-package-names:
name: Retrieve the package names published from this repository
runs-on: ubuntu-latest
outputs:
package-names: ${{ steps.request-package-names.outputs.package-names }}
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'

- name: Retrieve the names of packages
id: request-package-names
shell: bash
run: |
repoName=$(echo ${{ github.repository }} | cut -d '/' -f2)
chmod +x ./config/scripts/request-package-names.sh
./config/scripts/request-package-names.sh ${{ github.token }} \
$repoName ${{ github.repository_owner }} ./package-names.json
echo "package-names=$(<./package-names.json)" >> $GITHUB_OUTPUT

delete-obsolete-artifacts:
name: Remove obsolete artifacts published from this repository to GitHub Packages
needs: retrieve-package-names
runs-on: ubuntu-latest
strategy:
matrix:
package-name: ${{ fromJson(needs.retrieve-package-names.outputs.package-names) }}
steps:
- name: Remove obsolete artifacts from '${{ matrix.package-name }}' package
uses: actions/delete-package-versions@v5
with:
owner: ${{ github.repository_owner }}
package-name: ${{ matrix.package-name }}
package-type: 'maven'
token: ${{ github.token }}
min-versions-to-keep: ${{ env.VERSION_COUNT_TO_KEEP }}
# Ignores artifacts that do not contain the word "SNAPSHOT".
ignore-versions: '^(?!.+SNAPSHOT).*$'
33 changes: 24 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
#
# Copyright 2022, TeamDev. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Redistribution and use in source and/or binary forms, with or without
# modification, must retain the above copyright notice and the following
# disclaimer.
Expand All @@ -31,6 +25,15 @@
#
# Therefore, instructions below are superset of instructions required for all the projects.

# `jenv` local configuration.
.java-version

# Internal tool directories.
.fleet/

# Kotlin temp directories.
**/.kotlin/**

# IntelliJ IDEA modules and interim config files.
*.iml
.idea/*.xml
Expand All @@ -42,7 +45,6 @@

# Do not ignore the following IDEA settings
!.idea/misc.xml
!.idea/kotlinc.xml
!.idea/codeStyleSettings.xml
!.idea/codeStyles/
!.idea/copyright/
Expand All @@ -55,6 +57,7 @@

# Gradle build files
**/build/**
!**/src/**/build/**

# Build files produced by the IDE
**/out/**
Expand Down Expand Up @@ -101,5 +104,17 @@ hs_err_pid*
.packages
pubspec.lock

# Ignore the `tmp` directory used for building dependant repositories.
/tmp

#
# The gradle.properties file should contain settings specific to a developer's workstation.
#
# See sample file for a Mac OS X workstation below.
# -------
# # Set Java home to point to JDK8. This is need to generate classes working with Java8 API.
# # Otherwise the following warning appears during the build:
# # warning: [options] bootstrap class path not set in conjunction with -source 1.8
# #
# # suppress inspection "UnusedProperty"
# org.gradle.java.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/
# -------
gradle.properties
2 changes: 1 addition & 1 deletion .idea/copyright/TeamDev_Open_Source.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading