Skip to content

configure Wiremock to accept PUT requests #33

configure Wiremock to accept PUT requests

configure Wiremock to accept PUT requests #33

Workflow file for this run

name: "Mock-release JGiven"
on: [pull_request, push]
jobs:
mock-release-jgiven:
name: Mock-release JGiven
runs-on: ubuntu-latest
env:
SONATYPE_PASSWORD: 'notARealPassword'
SONATYPE_USERNAME: 'notARealUsername'
GPG_PASSWORD: 'espalhando'
GPG_KEY_ID: '[email protected]'
VERSION: '0.0.1-TEST'
steps:
- uses: actions/[email protected]
- name: Set up JDK 11
uses: actions/[email protected]
with:
java-version: '11'
distribution: 'adopt'
- name: Set up openpgp signing keys
run: |
gpg --quick-gen-key --batch --passphrase "${GPG_PASSWORD}" "${GPG_KEY_ID}"
gpg --list-keys
- name: Set up mock server
run: |
wget https://repo1.maven.org/maven2/org/wiremock/wiremock-standalone/3.3.1/wiremock-standalone-3.3.1.jar
wiremock=$(find ./ -name "wiremock-standalone-*.jar")
java -jar ${wiremock} --port 7000 --verbose &
curl -X POST --data '{"request": {"url": "/com/tngtech/jgiven/*", "method": "PUT"}, "response": {"status": 200, "body": "OK"}}' http://localhost:7000/__admin/mappings/new
- name: set an alternate version
run: "source scripts/source_files/helper_functions.sh && updateAllVersionInformation ${VERSION}"
- name: Attempt mock release
run: >
./gradlew test publishMavenPublicationToMavenLocal publishMavenPublicationToMavenRepository
-PsigningKey="$(gpg --batch --pinentry-mode=loopback --yes --passphrase "${GPG_PASSWORD}" --armor --export-secret-key "${GPG_KEY_ID}")"
-PsigningPassword="${GPG_PASSWORD}" -Ppublishing.releaseUrl=http://localhost:7000 -Ppublishing.allowInsecureProtocol=true
- name: Upload test results html files
continue-on-error: true
if: ${{failure()}}
uses: actions/[email protected]
with:
name: test-report.zip
path: /home/runner/work/JGiven/JGiven/*/build/reports/tests
if-no-files-found: ignore