Skip to content

Commit

Permalink
Merge branch 'main' into issue347
Browse files Browse the repository at this point in the history
  • Loading branch information
bitwiseman authored Oct 20, 2023
2 parents d336349 + 38baf5d commit e4b2ca1
Show file tree
Hide file tree
Showing 1,832 changed files with 162,303 additions and 34,373 deletions.
5 changes: 3 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
# Before submitting a PR:

- [ ] Changes must not break binary backwards compatibility. If you are unclear on how to make the change you think is needed while maintaining backward compatibility, [CONTRIBUTING.md](CONTRIBUTING.md) for details.
- [ ] Add JavaDocs and other comments as appropriate. Consider including links in comments to relevant documentation on https://docs.github.com/en/rest .
- [ ] Add JavaDocs and other comments explaining the behavior.
- [ ] When adding or updating methods that fetch entities, add `@link` JavaDoc entries to the relevant documentation on https://docs.github.com/en/rest .
- [ ] Add tests that cover any added or changed code. This generally requires capturing snapshot test data. See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
- [ ] Run `mvn -D enable-ci clean install site` locally. If this command doesn't succeed, your change will not pass CI.
- [ ] Push your changes to a branch other than `main`. You will create your PR from that branch.
Expand All @@ -14,6 +15,6 @@

- [ ] Fill in the "Description" above with clear summary of the changes. This includes:
- [ ] If this PR fixes one or more issues, include "Fixes #<issue number>" lines for each issue.
- [ ] Provide links to relevant documentation on https://docs.github.com/en/rest where possible.
- [ ] Provide links to relevant documentation on https://docs.github.com/en/rest where possible. If not including links, explain why not.
- [ ] All lines of new code should be covered by tests as reported by code coverage. Any lines that are not covered must have PR comments explaining why they cannot be covered. For example, "Reaching this particular exception is hard and is not a particular common scenario."
- [ ] Enable "Allow edits from maintainers".
22 changes: 12 additions & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
version: 2
updates:
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "monthly"
time: "02:00"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
time: "02:00"
- package-ecosystem: "maven"
directory: "/"
rebase-strategy: "disabled"
schedule:
interval: "monthly"
time: "02:00"
- package-ecosystem: "github-actions"
directory: "/"
rebase-strategy: "disabled"
schedule:
interval: "monthly"
time: "02:00"
15 changes: 11 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,15 @@ on:
schedule:
- cron: '20 0 * * 6'

permissions:
contents: read

jobs:
analyze:
permissions:
actions: read # for github/codeql-action/init to get workflow details
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/autobuild to send a status report
name: Analyze
runs-on: ubuntu-latest

Expand All @@ -35,11 +42,11 @@ jobs:

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

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -50,7 +57,7 @@ jobs:
# 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@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -64,4 +71,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
106 changes: 62 additions & 44 deletions .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,77 +14,95 @@ on:
env:
JAVA_11_PLUS_MAVEN_OPTS: "--add-opens jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"

permissions:
contents: read

jobs:
build:
name: build-only (Java ${{ matrix.java }})
name: build-only (Java 17)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: [ 16, 17 ]
fail-fast: true
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
cache: 'maven'
- name: Maven Install (skipTests)
env:
MAVEN_OPTS: ${{ env.JAVA_11_PLUS_MAVEN_OPTS }}
run: mvn -B clean install -DskipTests --file pom.xml
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
- name: Maven Install (skipTests)
env:
MAVEN_OPTS: ${{ env.JAVA_11_PLUS_MAVEN_OPTS }}
run: mvn -B clean install -DskipTests --file pom.xml
- uses: actions/upload-artifact@v3
with:
name: maven-target-directory
path: target/
retention-days: 3
site:
name: site (Java ${{ matrix.java }})
name: site (Java 17)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: [ 8, 11 ]
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'
cache: 'maven'
- name: Maven Site
run: mvn -B clean site -D enable-ci --file pom.xml
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
- name: Maven Site
env:
MAVEN_OPTS: ${{ env.JAVA_11_PLUS_MAVEN_OPTS }}
run: mvn -B clean site -D enable-ci --file pom.xml
test:
name: test (${{ matrix.os }}, Java ${{ matrix.java }})
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ ubuntu, windows ]
java: [ 8.0.192, 8, 11.0.3, 11, 16, 17 ]
java: [ 11, 17 ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
distribution: 'temurin'
cache: 'maven'
# JDK 8
- name: Maven Install without Code Coverage
if: matrix.os == 'windows' && startsWith(matrix.java, '8')
run: mvn -B clean install --file pom.xml
- name: Maven Install with Code Coverage
if: matrix.os != 'windows' && startsWith(matrix.java, '8')
run: mvn -B clean install -D enable-ci --file pom.xml
- name: Codecov Report
if: matrix.os != 'windows' && startsWith(matrix.java, '8')
uses: codecov/[email protected]
# JDK 11+
- name: Maven Install without Code Coverage
if: matrix.os == 'windows' && !startsWith(matrix.java, '8')
if: matrix.os == 'windows'
env:
MAVEN_OPTS: ${{ env.JAVA_11_PLUS_MAVEN_OPTS }}
run: mvn -B clean install --file pom.xml "-Dsurefire.argLine=--add-opens java.base/java.net=ALL-UNNAMED"
run: mvn -B clean install -D japicmp.skip=true --file pom.xml "-Dsurefire.argLine=--add-opens java.base/java.net=ALL-UNNAMED"
- name: Maven Install with Code Coverage
if: matrix.os != 'windows' && !startsWith(matrix.java, '8')
if: matrix.os != 'windows'
env:
MAVEN_OPTS: ${{ env.JAVA_11_PLUS_MAVEN_OPTS }}
run: mvn -B clean install -D enable-ci --file pom.xml "-Dsurefire.argLine=--add-opens java.base/java.net=ALL-UNNAMED"
- name: Codecov Report
if: matrix.os == 'ubuntu' && matrix.java == '17'
uses: codecov/[email protected]

test-java-8:
name: test Java 8 (no-build)
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: maven-target-directory
path: target
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 8
distribution: 'temurin'
cache: 'maven'
- name: Maven Test (no build) Java 8
run: mvn -B surefire:test -DfailIfNoTests -Dsurefire.excludesFile=src/test/resources/slow-or-flaky-tests.txt
6 changes: 6 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ on:
branches:
- main

permissions:
contents: read

jobs:
update_release_draft:
permissions:
contents: write # for release-drafter/release-drafter to create a github release
pull-requests: write # for release-drafter/release-drafter to add label to PR
runs-on: ubuntu-latest
steps:
- name: Release Drafter
Expand Down
12 changes: 11 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Contributing

## Make sure it's spotless

Run `mvn spotless:apply` to fix any formatting, etc issues.

## Make sure you pass CI

If the following does not succeed, you will not pass the pull request checks.

`mvn -D enable-ci clean install site`

## Using WireMock and Snapshots

This project has started converting to using WireMock to stub out http responses instead of use live data.
Expand Down Expand Up @@ -72,7 +82,7 @@ When modifying existing tests, you can change the stubbed WireMock data files by
#### Manual editing of data (minor changes only)

If you know what data will change, it is sometimes simplest to make any required changes to the data files manually.
This can be easier if the changes are minor or when you development environment is not setup to to take updated snapshots.
This can be easier if the changes are minor or when you development environment is not setup to take updated snapshots.

#### Generating a new snapshot

Expand Down
Loading

0 comments on commit e4b2ca1

Please sign in to comment.