Add job forbid-merge-commits to .github/workflows/pull-request.yml. #524
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build a Java project with Maven | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: Pull Request | |
on: [push, pull_request] | |
jobs: | |
unit-tests: | |
name: Unit Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
key: maven-test-${{ hashFiles('**/pom.xml') }} | |
path: ~/.m2/repository | |
restore-keys: | | |
maven-test- | |
maven- | |
- run: mvn --non-recursive wrapper:wrapper -Dmaven=3.9.6 | |
- name: Set up Java 11 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 11 | |
- run: ./mvnw --threads 2C --color=always verify | |
env: | |
MAVEN_OPTS: '-Xmx1g' | |
- name: 'Clean Maven cache' | |
run: rm -rf ~/.m2/repository/org/eclipse/collections | |
enforcer: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
key: maven-enforcer-${{ hashFiles('**/pom.xml') }} | |
path: ~/.m2/repository | |
restore-keys: | | |
maven-enforcer- | |
maven- | |
- run: mvn --non-recursive wrapper:wrapper -Dmaven=3.9.6 | |
- name: Set up Java 11 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 11 | |
- name: Run maven-enforcer-plugin | |
run: ./mvnw --threads 2C --color=always verify --activate-profiles maven-enforcer-plugin -DskipTests | |
env: | |
MAVEN_OPTS: '-Xmx1g' | |
- name: 'Clean Maven cache' | |
run: rm -rf ~/.m2/repository/org/eclipse/collections | |
dependency: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
key: maven-dependency-${{ hashFiles('**/pom.xml') }} | |
path: ~/.m2/repository | |
restore-keys: | | |
maven-dependency- | |
maven- | |
- run: mvn --non-recursive wrapper:wrapper -Dmaven=3.9.6 | |
- name: Set up Java 11 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 11 | |
- name: Run maven-dependency-plugin | |
run: ./mvnw --threads 2C --color=always verify --activate-profiles maven-dependency-plugin -DskipTests | |
env: | |
MAVEN_OPTS: '-Xmx1g' | |
- name: 'Clean Maven cache' | |
run: rm -rf ~/.m2/repository/org/eclipse/collections | |
unit-tests-no-p2: | |
name: Unit Tests ${{ matrix.java-version }} | |
strategy: | |
matrix: | |
java-version: [17, 21, 22] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
key: maven-test-no-p2-${{ hashFiles('**/pom.xml') }} | |
path: ~/.m2/repository | |
restore-keys: | | |
maven-test-no-p2- | |
maven-test- | |
maven- | |
- run: mvn --non-recursive wrapper:wrapper -Dmaven=3.9.6 | |
- name: Set up Java ${{ matrix.java-version }} | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ matrix.java-version }} | |
- name: Unit-Test | |
run: ./mvnw --color=always verify | |
env: | |
MAVEN_OPTS: '-Xmx1g' | |
- name: 'Clean Maven cache' | |
run: rm -rf ~/.m2/repository/org/eclipse/collections | |
unit-tests-early-access: | |
name: Unit Test Early Access | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
key: maven-test-early-access-${{ hashFiles('**/pom.xml') }} | |
path: ~/.m2/repository | |
restore-keys: | | |
maven-test-early-access- | |
maven-test- | |
maven- | |
- name: Download JDK 23 from jdk.java.net | |
uses: oracle-actions/setup-java@v1 | |
id: download-jdk | |
with: | |
website: jdk.java.net | |
release: 23 | |
- name: 'Print outputs' | |
shell: bash | |
run: | | |
echo 'Outputs' | |
echo "steps.download-jdk.outputs.archive = ${{ steps.download-jdk.outputs.archive }}" | |
echo "steps.download-jdk.outputs.version = ${{ steps.download-jdk.outputs.version }}" | |
- run: mvn --non-recursive wrapper:wrapper -Dmaven=3.9.6 | |
- run: java --version | |
- name: Unit-Test | |
run: ./mvnw --color=always verify | |
env: | |
MAVEN_OPTS: '-Xmx2g' | |
acceptance-tests: | |
name: Acceptance Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
key: maven-acceptance-test-${{ hashFiles('**/pom.xml') }} | |
path: ~/.m2/repository | |
restore-keys: | | |
maven-acceptance-test- | |
maven-test- | |
maven- | |
- run: mvn --non-recursive wrapper:wrapper -Dmaven=3.9.6 | |
- name: Set up Java 11 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 11 | |
- run: ./mvnw --color=always install --projects acceptance-tests --also-make --activate-profiles all | |
env: | |
MAVEN_OPTS: '-Xmx1g' | |
- name: 'Clean Maven cache' | |
run: rm -rf ~/.m2/repository/org/eclipse/collections | |
performance-tests: | |
name: Performance Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
key: maven-performance-test-${{ hashFiles('**/pom.xml') }} | |
path: ~/.m2/repository | |
restore-keys: | | |
maven-performance-test- | |
maven-test- | |
maven- | |
- run: mvn --non-recursive wrapper:wrapper -Dmaven=3.9.6 | |
- name: Set up Java 11 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 11 | |
- run: ./mvnw --color=always install --projects performance-tests --also-make --activate-profiles all -DskipTests=true | |
env: | |
MAVEN_OPTS: '-Xmx1g' | |
- name: 'Clean Maven cache' | |
run: rm -rf ~/.m2/repository/org/eclipse/collections | |
checkstyle: | |
name: Checkstyle | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: mvn --non-recursive wrapper:wrapper -Dmaven=3.9.6 | |
- name: Set up Java 11 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 11 | |
- name: Checkstyle | |
run: ./mvnw --color=always verify checkstyle:check --activate-profiles all -DskipTests=true | |
env: | |
MAVEN_OPTS: '-Xmx1g' | |
javadoc: | |
name: Javadoc 11 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
key: maven-javadoc-${{ hashFiles('**/pom.xml') }} | |
path: ~/.m2/repository | |
restore-keys: | | |
maven-javadoc- | |
maven- | |
- run: mvn --non-recursive wrapper:wrapper -Dmaven=3.9.6 | |
- name: Set up Java 11 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 11 | |
- name: Build Generator | |
run: ./mvnw --color=always -Dsurefire.useFile=false -DskipTests -Denforcer.skip=true clean install --projects 'eclipse-collections-code-generator,eclipse-collections-code-generator-maven-plugin' | |
- name: JavaDoc Aggregate | |
run: ./mvnw --color=always --activate-profiles maven-javadoc-plugin -DskipTests -Denforcer.skip=true clean javadoc:aggregate verify --projects '!unit-tests,!serialization-tests,!jcstress-tests,!unit-tests-java8,!test-coverage' | |
env: | |
MAVEN_OPTS: '-Xmx1g' | |
- name: JavaDoc Jar | |
run: ./mvnw --color=always --activate-profiles maven-javadoc-plugin -DskipTests -Denforcer.skip=true clean verify javadoc:jar --projects '!unit-tests,!serialization-tests,!jcstress-tests,!unit-tests-java8,!test-coverage' | |
env: | |
MAVEN_OPTS: '-Xmx1g' | |
- name: 'Clean Maven cache' | |
run: rm -rf ~/.m2/repository/org/eclipse/collections | |
javadoc-early-access: | |
name: Javadoc Early Access | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
key: maven-javadoc-ea-${{ hashFiles('**/pom.xml') }} | |
path: ~/.m2/repository | |
restore-keys: | | |
maven-javadoc-ea- | |
maven-javadoc- | |
maven- | |
- run: mvn --non-recursive wrapper:wrapper -Dmaven=3.9.6 | |
- name: Download JDK 23 from jdk.java.net | |
uses: oracle-actions/setup-java@v1 | |
id: download-jdk | |
with: | |
website: jdk.java.net | |
release: 23 | |
- name: 'Print outputs' | |
shell: bash | |
run: | | |
echo 'Outputs' | |
echo "steps.download-jdk.outputs.archive = ${{ steps.download-jdk.outputs.archive }}" | |
echo "steps.download-jdk.outputs.version = ${{ steps.download-jdk.outputs.version }}" | |
- run: java --version | |
- name: Build Generator | |
run: ./mvnw --threads 2C --color=always -DskipTests install --projects 'eclipse-collections-code-generator,eclipse-collections-code-generator-maven-plugin' | |
- name: Javadoc | |
run: ./mvnw --threads 2C --color=always --activate-profiles maven-javadoc-plugin -DskipTests javadoc:aggregate verify --projects '!unit-tests,!serialization-tests,!jcstress-tests,!unit-tests-java8,!test-coverage' | |
env: | |
MAVEN_OPTS: '-Xmx2g' | |
- name: 'Clean Maven cache' | |
run: rm -rf ~/.m2/repository/org/eclipse/collections | |
forbid-merge-commits: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Run Forbid Merge Commits Action | |
uses: motlin/forbid-merge-commits-action@main |