Skip to content

Commit

Permalink
Merge branch 'main' into faults-and-verifications
Browse files Browse the repository at this point in the history
  • Loading branch information
tomakehurst committed Nov 8, 2023
2 parents 0628ff7 + 5830b09 commit 72e2b2c
Show file tree
Hide file tree
Showing 7 changed files with 140 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @wiremock/wiremock-java-co-maintainers
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: gradle
directory: "/"
schedule:
interval: daily
time: "04:00"
open-pull-requests-limit: 10
2 changes: 2 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Use https://github.com/wiremock/.github/blob/main/.github/release_drafter.yml
_extends: .github
53 changes: 53 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Build and test

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
jdk: [11, 17]
runs-on: ${{ matrix.os }}
env:
JDK_VERSION: ${{ matrix.jdk }}

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.jdk }}
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Cache Gradle packages
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle

- name: Test
if: ${{ !(matrix.os == 'ubuntu-latest' && matrix.jdk == 11 && github.event_name == 'push') }}
run: ./gradlew check --stacktrace --no-daemon

- name: Archive test report - ${{ matrix.os }} JDK ${{ matrix.jdk }}
if: always()
uses: actions/upload-artifact@v2
with:
name: wiremock-grpc-extension-test-report-${{ matrix.os }} JDK ${{ matrix.jdk }}
path: |
build/reports/tests/test
build/test-results/test
20 changes: 20 additions & 0 deletions .github/workflows/changelog-draft.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Release Drafter

on:
push:
branches:
- main
- master
workflow_dispatch:

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
with:
name: next
tag: next
version: next
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37 changes: 37 additions & 0 deletions .github/workflows/publish-test-results.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish Test Results

on:
workflow_run:
workflows: ["CI"]
types:
- completed

jobs:
unit-test-results:
name: Unit Test Results
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion != 'skipped'

steps:
- name: Download and Extract Artifacts
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
mkdir -p artifacts && cd artifacts
artifacts_url=${{ github.event.workflow_run.artifacts_url }}
gh api "$artifacts_url" -q '.artifacts[] | [.name, .archive_download_url] | @tsv' | while read artifact
do
IFS=$'\t' read name url <<< "$artifact"
gh api $url > "$name.zip"
unzip -d "$name" "$name.zip"
done
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
with:
commit: ${{ github.event.workflow_run.head_sha }}
event_file: artifacts/Event File/event.json
event_name: ${{ github.event.workflow_run.event }}
files: "artifacts/**/*.xml"
19 changes: 19 additions & 0 deletions .github/workflows/validate-gradle-wrapper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Validate Gradle wrapper

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
validate:
name: Validate Gradle wrapper
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

0 comments on commit 72e2b2c

Please sign in to comment.