Skip to content

build(deps): Bump org.objenesis:objenesis from 3.3 to 3.4 (#1315) #2690

build(deps): Bump org.objenesis:objenesis from 3.3 to 3.4 (#1315)

build(deps): Bump org.objenesis:objenesis from 3.3 to 3.4 (#1315) #2690

Workflow file for this run

name: build
on:
push:
branches:
- main
paths-ignore:
- '.all-contributorsrc'
- '.github/workflows/publish_docs.yml'
- 'README.adoc'
- 'CHANGELOG.md'
- 'bin/generate-site.sh'
- 'docs/antora.yml'
- 'etc/index.tpl'
pull_request:
paths-ignore:
- '.all-contributorsrc'
- '.github/workflows/publish_docs.yml'
- 'README.adoc'
- 'CHANGELOG.md'
- 'bin/generate-site.sh'
- 'docs/antora.yml'
- 'etc/index.tpl'
jobs:
build:
runs-on: ubuntu-latest
env:
TC_CLOUD_TOKEN: ${{ secrets.TC_CLOUD_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Ensure read permissions
run: chmod 640 neo4j-migrations-examples/neo4j-migrations-cluster-tests/src/test/resources/cc/neo4j.conf
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 21
- name: Prepare TC env
run: echo "testcontainers.reuse.enable=true" > ~/.testcontainers.properties
- name: Enable Sonar for local PRs not from Dependabot
if: ${{ github.event.sender.login != 'dependabot[bot]' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
run: echo "USE_SONAR=sonar" >> $GITHUB_ENV
- name: Disable Sonar for foreign PRs or from Dependabot
if: ${{ github.event.sender.login == 'dependabot[bot]' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) }}
run: echo "USE_SONAR=-sonar" >> $GITHUB_ENV
- name: Prepare testcontainers.cloud agent
if: env.TC_CLOUD_TOKEN != ''
run: |
curl -L -o agent https://app.testcontainers.cloud/download/testcontainers-cloud-agent_linux_x86-64
chmod +x agent
./agent &
./agent wait
- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}-${{ github.sha }}
- name: Download dependencies upfront
run: ./mvnw -Dfast --no-transfer-progress clean package dependency:go-offline
- name: Clean and verify
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./mvnw -Dmigrations.test-only-latest-neo4j=true --no-transfer-progress clean install -P$USE_SONAR
- name: Upload assembly
uses: actions/upload-artifact@v1
with:
name: assembly
path: neo4j-migrations-cli/target/assembly
ensure_windows_files:
if: ${{ github.event.sender.login != 'dependabot[bot]' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
name: Ensure file locations working on windows
runs-on: windows-latest
needs: build
steps:
- name: 'Prepare git'
run: git config --global core.autocrlf false
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 21
- name: 'Restore Maven packages'
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-m2
- name: 'Ensure Maven-Plugin can deal with windows paths'
run: ./mvnw -DskipCoreTests --no-transfer-progress test -pl neo4j-migrations-maven-plugin -am
- name: 'Set up JBang'
run: choco install jbang
- name: 'Start Neo4j in Background'
env:
EXTERNAL_TEST_DB_URL: ${{ secrets.EXTERNAL_TEST_DB_URL }}
if: "${{ env.EXTERNAL_TEST_DB_URL == 'bolt://localhost:7687' }}"
run: cmd /c "START /b jbang bin/start_neo4j.java"
- name: Download assembly
uses: actions/download-artifact@v1
with:
name: assembly
path: assembly
- name: 'Check availability'
id: check-availability
env:
EXTERNAL_TEST_DB_URL: ${{ secrets.EXTERNAL_TEST_DB_URL }}
EXTERNAL_TEST_DB_PWD: ${{ secrets.EXTERNAL_TEST_DB_PWD }}
run: jbang bin/check_availability.java EXTERNAL_TEST_DB_URL EXTERNAL_TEST_DB_PWD 20
continue-on-error: true
- name: 'External DB not available'
if: steps.check-availability.outcome == 'failure'
run: echo "External DB not available, skipping Windows tests."
- name: 'Ensure CLI can deal with windows paths'
if: steps.check-availability.outcome == 'success'
env:
EXTERNAL_TEST_DB_URL: ${{ secrets.EXTERNAL_TEST_DB_URL }}
EXTERNAL_TEST_DB_PWD: ${{ secrets.EXTERNAL_TEST_DB_PWD }}
run: assembly/bin/neo4j-migrations.bat -a %EXTERNAL_TEST_DB_URL% --password:env EXTERNAL_TEST_DB_PWD --location file:///$pwd/neo4j-migrations-test-resources/src/main/resources/some/changeset info
ensure_jdk_compat:
name: Ensure compatibility with minimum required Java version
runs-on: ubuntu-latest
services:
neo4j:
image: neo4j:4.4
env:
NEO4J_AUTH: neo4j/secret
options: --health-cmd "timeout 5 bash -c 'cat < /dev/null > /dev/tcp/127.0.0.1/7687'" --health-interval 10s --health-timeout 5s --health-retries 5
ports:
- 7687:7687
needs: build
steps:
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 21
- name: Download assembly
uses: actions/download-artifact@v1
with:
name: assembly
path: assembly
- name: Make executable again
run: chmod +x assembly/bin/neo4j-migrations
- name: Print info
run: assembly/bin/neo4j-migrations -a bolt://localhost:7687 -p secret info
test_cli_native:
name: Test CLI native binary
runs-on: ubuntu-latest
needs: ensure_jdk_compat
steps:
- uses: graalvm/setup-graalvm@v1
with:
distribution: 'graalvm-community'
java-version: 21
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install upx
run: sudo apt-get install upx
- uses: actions/checkout@v3
- name: Restore Maven cache
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-m2
- name: Clean and build
run: ./mvnw --no-transfer-progress -Dnative -DskipTests -pl eu.michael-simons.neo4j:neo4j-migrations-cli clean package
- name: Run binary
uses: jbangdev/jbang-action@v0.86.0
with:
script: bin/test_native_cli.java
test_quarkus_native:
name: Test Quarkus extension in native image
runs-on: ubuntu-latest
needs: ensure_jdk_compat
steps:
- uses: graalvm/setup-graalvm@v1
with:
distribution: 'graalvm-community'
java-version: 21
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- name: Restore Maven cache
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-m2
- name: Clean and verify
run: ./mvnw --no-transfer-progress -Dnative -pl :neo4j-migrations-quarkus-integration-tests clean verify