Skip to content
Open
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
7 changes: 2 additions & 5 deletions .github/workflows/check-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ on:
- '.idea/**'
- 'assets/**'

env:
DEMO_MAVEN_MODULE: ${{ github.event.repository.name }}-demo

jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -160,10 +157,10 @@ jobs:
${{ runner.os }}-pmd-

- name: Run PMD
run: ./mvnw -B test pmd:aggregate-pmd-no-fork pmd:check -P pmd -DskipTests -T2C
run: ./mvnw -B test pmd:aggregate-pmd-no-fork pmd:check -P pmd -T2C

- name: Run CPD (Copy Paste Detector)
run: ./mvnw -B pmd:aggregate-cpd pmd:cpd-check -P pmd -DskipTests -T2C
run: ./mvnw -B pmd:aggregate-cpd pmd:cpd-check -P pmd -T2C

- name: Upload report
if: ${{ !cancelled() }}
Expand Down
70 changes: 51 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ on:
push:
branches: [ master ]

env:
PRIMARY_MAVEN_MODULE: ${{ github.event.repository.name }}

permissions:
contents: write
pull-requests: write

# DO NOT RESTORE CACHE for critical release steps to prevent a (extremely unlikely) scenario
# where a supply chain attack could be achieved due to poisoned cache
jobs:
Expand All @@ -37,7 +30,8 @@ jobs:
${{ runner.os }}-mvn-build-

- name: Build with Maven
run: ./mvnw -B clean package -T2C
run: ../mvnw -B clean package -T2C
working-directory: src

- name: Check for uncommited changes
run: |
Expand All @@ -61,6 +55,8 @@ jobs:
runs-on: ubuntu-latest
needs: [check-code]
timeout-minutes: 10
permissions:
contents: write
outputs:
upload_url: ${{ steps.create-release.outputs.upload_url }}
steps:
Expand All @@ -77,10 +73,9 @@ jobs:
- name: Get version
id: version
run: |
version=$(../mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
version=$(mvnw -B help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "release=$version" >> $GITHUB_OUTPUT
echo "releasenumber=${version//[!0-9]/}" >> $GITHUB_OUTPUT
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}

- name: Commit and Push
run: |
Expand All @@ -106,7 +101,7 @@ jobs:
```XML
<dependency>
<groupId>software.xdev</groupId>
<artifactId>${{ env.PRIMARY_MAVEN_MODULE }}</artifactId>
<artifactId>${{ github.event.repository.name }}</artifactId>
<version>${{ steps.version.outputs.release }}</version>
</dependency>
```
Expand Down Expand Up @@ -135,8 +130,8 @@ jobs:
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Only import once

- name: Publish to GitHub Packages Central
run: ../mvnw -B deploy -P publish -DskipTests -DaltDeploymentRepository=github-central::https://maven.pkg.github.com/xdev-software/central
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
run: ../mvnw -B deploy -P publish -DaltDeploymentRepository=github-central::https://maven.pkg.github.com/xdev-software/central
working-directory: src
env:
PACKAGES_CENTRAL_TOKEN: ${{ secrets.PACKAGES_CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
Expand All @@ -152,14 +147,14 @@ jobs:
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Publish to Central Portal
run: ../mvnw -B deploy -P publish,publish-sonatype-central-portal -DskipTests
run: ../mvnw -B deploy -P publish,publish-sonatype-central-portal
env:
MAVEN_CENTRAL_USERNAME: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PORTAL_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PORTAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
working-directory: src

publish-pages:
build-pages:
runs-on: ubuntu-latest
needs: [prepare-release]
timeout-minutes: 15
Expand Down Expand Up @@ -188,20 +183,57 @@ jobs:
${{ runner.os }}-mvn-build-

- name: Build site
run: ../mvnw -B compile site -DskipTests -T2C
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
run: ../mvnw -B compile site -P site -T2C
working-directory: src

- name: Aggregate site
run: |
module_dirs=$(../mvnw -B -q --also-make exec:exec -Dexec.executable="pwd")
for m in "${module_dirs[@]}"
do
echo "$m/target/site -> ./target/$m"
mkdir -p ./target/$m
cp -r $m/target/site ./target/$m
done
working-directory: src

- name: Upload pages artifact
uses: actions/upload-pages-artifact@v5
with:
path: src/target/site

- name: Deploy to Github pages
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./${{ env.PRIMARY_MAVEN_MODULE }}/target/site
publish_dir: ./src/target/site
force_orphan: true

deploy-pages:
runs-on: ubuntu-latest
needs: [build-pages]
timeout-minutes: 10
concurrency:
group: 'pages'
cancel-in-progress: false
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5

after-release:
runs-on: ubuntu-latest
needs: [publish-maven]
timeout-minutes: 10
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v7

Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ name: Test Deployment
on:
workflow_dispatch:

env:
PRIMARY_MAVEN_MODULE: ${{ github.event.repository.name }}

jobs:
publish-maven:
runs-on: ubuntu-latest
Expand All @@ -24,8 +21,8 @@ jobs:
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Only import once

- name: Publish to GitHub Packages Central
run: ../mvnw -B deploy -P publish -DskipTests -DaltDeploymentRepository=github-central::https://maven.pkg.github.com/xdev-software/central
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
run: ../mvnw -B deploy -P publish -DaltDeploymentRepository=github-central::https://maven.pkg.github.com/xdev-software/central
working-directory: src
env:
PACKAGES_CENTRAL_TOKEN: ${{ secrets.PACKAGES_CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
Expand All @@ -41,8 +38,8 @@ jobs:
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Publish to Central Portal
run: ../mvnw -B deploy -P publish,publish-sonatype-central-portal -DskipTests
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
run: ../mvnw -B deploy -P publish,publish-sonatype-central-portal
working-directory: src
env:
MAVEN_CENTRAL_USERNAME: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PORTAL_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PORTAL_TOKEN }}
Expand Down
1 change: 0 additions & 1 deletion .run/Run Demo.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<configuration default="false" name="Run Demo" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="software.xdev.Application" />
<module name="testcontainers-selenium-demo" />
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="software.xdev.*" />
Expand Down
19 changes: 19 additions & 0 deletions demos/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>software.xdev</groupId>
<artifactId>root</artifactId>
<version>2.1.2-SNAPSHOT</version>
</parent>

<artifactId>demos</artifactId>
<packaging>pom</packaging>

<modules>
<module>testcontainers-selenium-demo</module>
</modules>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,14 @@

<parent>
<groupId>software.xdev</groupId>
<artifactId>testcontainers-selenium-root</artifactId>
<artifactId>demos</artifactId>
<version>2.1.2-SNAPSHOT</version>
</parent>

<artifactId>testcontainers-selenium-demo</artifactId>
<version>2.1.2-SNAPSHOT</version>
<packaging>jar</packaging>

<organization>
<name>XDEV Software</name>
<url>https://xdev.software</url>
</organization>

<properties>
<javaVersion>17</javaVersion>
<maven.compiler.release>${javaVersion}</maven.compiler.release>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<mainClass>software.xdev.Application</mainClass>
</properties>

Expand Down Expand Up @@ -105,17 +93,6 @@
<finalName>${project.artifactId}</finalName>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.16.0</version>
<configuration>
<release>${maven.compiler.release}</release>
<compilerArgs>
<arg>-proc:none</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
Expand Down
57 changes: 49 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,45 @@
<modelVersion>4.0.0</modelVersion>

<groupId>software.xdev</groupId>
<artifactId>testcontainers-selenium-root</artifactId>
<artifactId>root</artifactId>
<version>2.1.2-SNAPSHOT</version>
<packaging>pom</packaging>

<organization>
<name>XDEV Software</name>
<url>https://xdev.software</url>
</organization>

<modules>
<module>testcontainers-selenium</module>
<module>testcontainers-selenium-demo</module>
<module>src</module>
<module>demos</module>
</modules>

<properties>
<javaVersion>17</javaVersion>
<maven.compiler.release>${javaVersion}</maven.compiler.release>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>

<url>https://github.com/xdev-software/testcontainers-selenium</url>

<scm>
<url>https://github.com/xdev-software/testcontainers-selenium</url>
<connection>scm:git:https://github.com/xdev-software/testcontainers-selenium.git</connection>
</scm>

<inceptionYear>2024</inceptionYear>

<organization>
<name>XDEV Software</name>
<url>https://xdev.software</url>
</organization>

<developers>
<developer>
<name>XDEV Software</name>
<organization>XDEV Software</organization>
<url>https://xdev.software</url>
</developer>
</developers>

<licenses>
<license>
<name>Apache-2.0</name>
Expand All @@ -32,6 +52,24 @@
</license>
</licenses>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.16.0</version>
<configuration>
<release>${maven.compiler.release}</release>
<compilerArgs>
<arg>-proc:none</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

<profiles>
<profile>
<id>checkstyle</id>
Expand Down Expand Up @@ -65,6 +103,9 @@
</profile>
<profile>
<id>pmd</id>
<properties>
<skipTests>true</skipTests>
</properties>
<build>
<plugins>
<plugin>
Expand Down
Loading
Loading