chore(deps): bump com.squareup.okhttp3:okhttp in /examples/junit-sample #2116
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
name: CI | |
on: [ push ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
java: [ '11' ] | |
permissions: | |
checks: write | |
contents: write | |
env: | |
AWS_REGION: "eu-west-1" | |
TESTCONTAINERS_RYUK_DISABLED: "true" | |
CONTAINER_BUILDER: "buildx" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Write changelog | |
if: ${{ (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/develop') && matrix.java == '11' }} | |
env: | |
GOBIN: /usr/local/bin/ | |
run: | | |
mkdir -p build | |
go install github.com/outofcoffee/since@v0.14.0 | |
since changelog extract -q > build/CHANGES.md | |
cat build/CHANGES.md | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: 'temurin' | |
cache: 'gradle' | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up build environment | |
run: | | |
chmod +x ./scripts/*.sh | |
# Disable gradle daemon | |
mkdir -p ~/.gradle | |
echo "org.gradle.daemon=false" >> ~/.gradle/gradle.properties | |
- name: Determine effective branch | |
id: git-meta | |
run: | | |
EFFECTIVE_BRANCH_NAME="$( ./scripts/get-effective-branch.sh )" | |
echo "EFFECTIVE_BRANCH=${EFFECTIVE_BRANCH_NAME}" >> $GITHUB_OUTPUT | |
- name: Test | |
run: ./gradlew test --info --stacktrace | |
- name: Publish Unit Test Results | |
if: always() | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
with: | |
files: "**/test-results/**/*.xml" | |
comment_mode: off | |
- name: Build distributions | |
run: ./gradlew dist --info --stacktrace | |
- name: Integration test | |
run: | | |
./scripts/docker-build.sh -p false dev | |
./scripts/integration-tests.sh dev | |
- name: Build and push Docker images | |
id: docker-build | |
if: ${{ (startsWith(github.ref, 'refs/tags/') || steps.git-meta.outputs.EFFECTIVE_BRANCH == 'develop') && matrix.java == '11' }} | |
run: | | |
case ${{ steps.git-meta.outputs.EFFECTIVE_BRANCH }} in | |
develop) | |
./scripts/docker-build.sh -p true beta | |
;; | |
main) | |
CURRENT_VERSION="$( git describe --tags --exact-match )" | |
if [[ "${CURRENT_VERSION:0:1}" == "v" ]]; then | |
CURRENT_VERSION="$( echo ${CURRENT_VERSION} | cut -c 2- )" | |
fi | |
./scripts/docker-build.sh -p true "${CURRENT_VERSION}" | |
./scripts/docker-build.sh -p true "latest" | |
;; | |
release/2.x) | |
CURRENT_VERSION="$( git describe --tags --exact-match )" | |
if [[ "${CURRENT_VERSION:0:1}" == "v" ]]; then | |
CURRENT_VERSION="$( echo ${CURRENT_VERSION} | cut -c 2- )" | |
fi | |
./scripts/docker-build.sh -p true "${CURRENT_VERSION}" | |
;; | |
esac | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Release Java assets | |
if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.java == '11' }} | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
const script = require('./.github/github-release.js') | |
await script({github, context}, [ | |
'main', | |
'./distro/awslambda/build/distributions/imposter-awslambda.zip', | |
'./mock/hbase/build/libs/imposter-plugin-mock-hbase.jar', | |
'./mock/sfdc/build/libs/imposter-plugin-mock-sfdc.jar', | |
'./mock/wiremock/build/libs/imposter-plugin-wiremock.jar', | |
'./store/dynamodb/build/libs/imposter-plugin-store-dynamodb.jar', | |
'./store/graphql/build/libs/imposter-plugin-store-graphql.jar', | |
'./store/redis/build/libs/imposter-plugin-store-redis.jar', | |
'./lib/fake-data/build/libs/imposter-plugin-fake-data.jar', | |
]) | |
- name: Publish Maven artifacts | |
if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.java == '11' }} | |
run: ./gradlew publish --info --stacktrace | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |