LDEV-6267 relocate shaded ehcache classes to prevent OSGi ClassCastException #223
Workflow file for this run
This file contains hidden or 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: Java CI | |
| on: | |
| push: | |
| branches: ['5.6'] | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| deploy: | |
| description: 'Deploy to Maven Central' | |
| type: boolean | |
| default: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| outputs: | |
| version: ${{ steps.extract-version.outputs.VERSION }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up JDK 11 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '11' | |
| distribution: 'temurin' | |
| - name: Cache Maven packages | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.m2/repository | |
| key: maven-${{ hashFiles('pom.xml') }} | |
| restore-keys: maven- | |
| - name: Extract version number | |
| id: extract-version | |
| run: | | |
| VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) | |
| echo "VERSION=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Build extension | |
| run: mvn -B -e clean verify | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: orm-lex | |
| path: target/*.lex | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| needs: build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - java: '11' | |
| lucee: '6.2/snapshot/light' | |
| - java: '11' | |
| lucee: '7.0/snapshot/light' | |
| - java: '21' | |
| lucee: '6.2/snapshot/light' | |
| - java: '21' | |
| lucee: '7.0/snapshot/light' | |
| - java: '21' | |
| lucee: '7.1/snapshot/light' | |
| - java: '25' | |
| lucee: '7.1/snapshot/light' | |
| services: | |
| mysql: | |
| image: mysql:8.0 | |
| env: | |
| MYSQL_ROOT_PASSWORD: root | |
| MYSQL_DATABASE: lucee | |
| MYSQL_USER: lucee | |
| MYSQL_PASSWORD: lucee | |
| ports: | |
| - 3306:3306 | |
| options: >- | |
| --health-cmd="mysqladmin ping -h 127.0.0.1" | |
| --health-interval=10s | |
| --health-timeout=5s | |
| --health-retries=5 | |
| sql-server: | |
| image: ghcr.io/lucee/mssql-server:test-mirror | |
| env: | |
| MSSQL_PID: Express | |
| ACCEPT_EULA: Y | |
| SA_PASSWORD: Lucee!1433 | |
| ports: | |
| - 1433:1433 | |
| options: --health-cmd="/opt/mssql-tools18/bin/sqlcmd -C -S localhost -U SA -P ${SA_PASSWORD} -Q 'SELECT 1' || exit 1" --health-interval 10s --health-timeout 5s --health-retries 5 | |
| postgres: | |
| image: postgres:15 | |
| env: | |
| POSTGRES_DB: lucee | |
| POSTGRES_USER: lucee | |
| POSTGRES_PASSWORD: lucee | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd="pg_isready -U lucee" | |
| --health-interval=10s | |
| --health-timeout=5s | |
| --health-retries=5 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: ${{ matrix.java }} | |
| distribution: 'temurin' | |
| - name: Cache Maven packages | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.m2/repository | |
| key: maven-${{ hashFiles('pom.xml') }} | |
| restore-keys: maven- | |
| - name: Cache Lucee files | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/work/_actions/lucee/script-runner/main/lucee-download-cache | |
| key: lucee-downloads | |
| - name: Download extension artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: orm-lex | |
| path: target | |
| - name: Checkout Lucee | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: lucee/lucee | |
| path: lucee | |
| - name: Run Lucee Test Suite | |
| uses: lucee/script-runner@main | |
| with: | |
| webroot: ${{ github.workspace }}/lucee/ | |
| execute: /test/bootstrap-tests.cfm | |
| luceeVersion: ${{ matrix.lucee }} | |
| extensionDir: ${{ github.workspace }}/target | |
| env: | |
| testLabels: orm | |
| testAdditional: ${{ github.workspace }}/tests | |
| testServices: mysql,mssql,postgres | |
| MYSQL_SERVER: localhost | |
| MYSQL_USERNAME: lucee | |
| MYSQL_PASSWORD: lucee | |
| MYSQL_PORT: 3306 | |
| MYSQL_DATABASE: lucee | |
| MSSQL_SERVER: localhost | |
| MSSQL_USERNAME: sa | |
| MSSQL_PASSWORD: Lucee!1433 | |
| MSSQL_PORT: 1433 | |
| MSSQL_DATABASE: master | |
| POSTGRES_SERVER: localhost | |
| POSTGRES_USERNAME: lucee | |
| POSTGRES_PASSWORD: lucee | |
| POSTGRES_PORT: 5432 | |
| POSTGRES_DATABASE: lucee | |
| deploy: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| needs: [build, test] | |
| if: github.event_name == 'workflow_dispatch' && inputs.deploy && github.ref == 'refs/heads/5.6' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up JDK 11 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '11' | |
| - name: Cache Maven packages | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.m2/repository | |
| key: maven-${{ hashFiles('pom.xml') }} | |
| restore-keys: maven- | |
| - name: Import GPG key | |
| run: | | |
| echo "$GPG_PRIVATE_KEY" | base64 --decode | gpg --batch --import | |
| env: | |
| GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
| - name: Build and Deploy with Maven | |
| env: | |
| VERSION: ${{ needs.build.outputs.version }} | |
| MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | |
| MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | |
| GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
| run: | | |
| if [[ "$VERSION" == *-SNAPSHOT ]]; then | |
| echo "------- Maven Deploy snapshot -------"; | |
| mvn -B -e clean deploy --settings maven-settings.xml | |
| elif [[ "$VERSION" == *-ALPHA ]]; then | |
| echo "------- Maven Install alpha -------"; | |
| mvn -B -e clean install --settings maven-settings.xml | |
| else | |
| echo "------- Maven Deploy release -------"; | |
| mvn -B -e clean deploy -DperformRelease=true --settings maven-settings.xml | |
| fi |