diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index acb3d12461e..8e3e7c9628f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,20 +4,23 @@ > Reviewing is a process done by project maintainers, mostly on a volunteer basis. We try to keep the overhead as small as possible and appreciate if you help us to do so by completing the following items. Feel free to ask in a comment if you have troubles with any of them. +**Submitting the PR does not require you to check all items, but by the time it gets merged, they should be either satisfied or not applicable.** + For all pull requests: -- [ ] Confirm you have read the [contribution guidelines](https://github.com/geoserver/geoserver/blob/master/CONTRIBUTING.md) +- [ ] Confirm you have read the [contribution guidelines](https://github.com/geoserver/geoserver/blob/master/CONTRIBUTING.md) - [ ] You have sent a Contribution Licence Agreement (CLA) as necessary (not required for small changes, e.g., fixing typos in documentation) - [ ] Make sure the first PR targets the master branch, eventual backports will be managed later. This can be ignored if the PR is fixing an issue that only happens in a specific branch, but not in newer ones. The following are required only for core and extension modules (they are welcomed, but not required, for community modules): + - [ ] There is a ticket in Jira describing the issue/improvement/feature (a notable exemptions is, changes not visible to end users) - [ ] PR for bug fixes and small new features are presented as a single commit - [ ] Commit message must be in the form "[GEOS-XYZW] Title of the Jira ticket" (export to XML in Jira generates the message in this exact form) - [ ] The pull request contains changes related to a single objective. If multiple focuses cannot be avoided, each one is in its own commit and has a separate ticket describing it. - [ ] New unit tests have been added covering the changes -- [ ] This PR passes all existing unit tests (test results will be reported by travis-ci after opening this PR) -- [ ] This PR passes the [QA checks](https://docs.geoserver.org/latest/en/developer/qa-guide/index.html) (QA checks results will be reported by travis-ci after opening this PR) +- [ ] This PR passes all existing unit tests (test results will be reported by Continuous Integration after opening this PR) +- [ ] This PR passes the [QA checks](https://docs.geoserver.org/latest/en/developer/qa-guide/index.html) (QA checks results will be reported by Continuous Integration after opening this PR) - [ ] Commits changing the UI, existing user workflows, or adding new functionality, need to include documentation updates (screenshots, text) - [ ] Committs changing the REST API, or any configuration object, should check it the REST API docs (Swagger YAML files and classic documentation) need to be updated. diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 00000000000..320dc0b71cc --- /dev/null +++ b/.github/workflows/linux.yml @@ -0,0 +1,92 @@ +name: Linux GitHub CI + +on: [pull_request] + +env: + MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 -Xmx512m -Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss,SSS + TAKARI_SMART_BUILDER_VERSION: 0.6.1 + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - os: ubuntu-18.04 + jdk: 8 + - os: ubuntu-20.04 + jdk: 11 + steps: + - uses: actions/checkout@v2 + with: + # 500 commits, set to 0 to get all + fetch-depth: 500 + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.jdk }} + - name: Set up Maven + uses: stCarolas/setup-maven@v4 + with: + maven-version: 3.6.3 + - name: Maven repository caching + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: gs-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + gs-${{ runner.os }}-maven- + - name: Build with Maven + run: mvn -B -U -T3 -fae -Dfmt.skip=true -Prelease -f src/pom.xml clean install + - name: Build community modules + run: mvn -nsu -B -U -T4 -fae -Dfmt.skip=true -DskipTests -Prelease -PcommunityRelease -f src/community/pom.xml clean install + - name: Package + run: mvn -f src/pom.xml assembly:single -nsu -N + - name: Package community modules + run: mvn -f src/community/pom.xml assembly:single -nsu -N + - name: Remove SNAPSHOT jars from repository + run: | + find .m2/repository -name "*SNAPSHOT*" -type d | xargs rm -rf {} + + QA: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + with: + # 500 commits, set to 0 to get all + fetch-depth: 500 + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Set up Maven + uses: stCarolas/setup-maven@v4 + with: + maven-version: 3.6.3 + - name: Maven repository caching + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: gs-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + gs-${{ runner.os }}-maven- + - name: Build with Maven + run: mvn -B -U -T3 -fae -Dfmt.action=check -Dqa -DskipTests=true -Prelease -f src/pom.xml clean install + - name: Build community modules + run: mvn -nsu -B -U -T4 -fae -Dfmt.action=check -DskipTests -Prelease -PcommunityRelease -f src/community/pom.xml clean install + - name: Remove SNAPSHOT jars from repository + run: | + find .m2/repository -name "*SNAPSHOT*" -type d | xargs rm -rf {} + + docs: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v1 + - uses: BSFishy/pip-action@v1 + with: + packages: | + sphinx + requests + - name: Build docs + run: mvn -f doc/en install diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ed47f9a4a69..00000000000 --- a/.travis.yml +++ /dev/null @@ -1,63 +0,0 @@ -cache: - directories: - - "$HOME/.m2" - - downloads -language: java -before_install: - - rm ~/.m2/settings.xml - - unset _JAVA_OPTIONS -env: - global: - - MAVEN_OPTS=-Xmx512m - - MAVEN_VERSION=3.6.3 - - TAKARI_SMART_BUILDER_VERSION=0.6.1 -before_script: - - mkdir -p downloads - - export MAVEN_ZIP=apache-maven-$MAVEN_VERSION-bin.zip - - | - if [ ! -f downloads/$MAVEN_ZIP ]; then - wget -P downloads https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/$MAVEN_VERSION/$MAVEN_ZIP - fi - - export SMART_JAR=takari-smart-builder-$TAKARI_SMART_BUILDER_VERSION.jar - - | - if [ ! -f downloads/$SMART_JAR ]; then - wget -P downloads https://repo1.maven.org/maven2/io/takari/maven/takari-smart-builder/$TAKARI_SMART_BUILDER_VERSION/$SMART_JAR - fi - - unzip downloads/$MAVEN_ZIP - - export M2_HOME=$PWD/apache-maven-$MAVEN_VERSION - - cp downloads/$SMART_JAR $M2_HOME/lib/ext - - export PATH=$M2_HOME/bin:$PATH - - mvn --version -install: - - if [ "$ACTION" == "docs" ]; then sudo pip install sphinx requests; fi -script: - - if [ "$ACTION" == "build" ]; then mvn -f src/pom.xml -B -U -T3 -fae -Prelease --builder smart clean install $ARGS && mvn -f src/community/pom.xml -nsu -B -U -T4 -fae -DskipTests -Prelease -PcommunityRelease --builder smart clean install $COMMUNITY_ARGS; fi - - if [ "$ACTION" == "build" ]; then grep -H "`_ apply +The GeoServer builds on Github Actions and `https://build.geoserver.org/ `_ apply `PMD `_ and `Error Prone `_ checks on the code base and will fail the build in case of rule violation.