Skip to content

Commit

Permalink
add bundle test
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Jun 28, 2024
1 parent 3183154 commit 025e300
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/bundle-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Check Bundles

on:
workflow_dispatch:
workflow_call:

jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
luceeVersion:
[
5.4/snapshot/jar,
6.0/snapshot/jar,
6.1/snapshot/jar,
6.1.0/snapshot/jar,
6.2/snapshot/jar,
]
javaVersion: [ 11 ]
env:
luceeVersionQuery: ${{ matrix.luceeVersion }}
compile: ${{ github.event.inputs.compile }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK ${{matrix.javaVersion}}
uses: actions/setup-java@v4
with:
java-version: ${{matrix.javaVersion}}
distribution: "temurin"
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: maven-cache
- name: Cache Lucee files
uses: actions/cache@v4
with:
path: /home/runner/work/_actions/lucee/script-runner/main/lucee-download-cache
key: lucee-downloads
- name: Save default .CFConfig.json
uses: lucee/script-runner@main
with:
webroot: ${{ github.workspace }}/custom/default-cfconfig
execute: /saveDefault.cfm
luceeVersionQuery: ${{ matrix.luceeVersion }}
- name: Load Lucee and extensins with LUCEE_ENABLE_BUNDLE_DOWNLOAD disabled
uses: lucee/script-runner@main
with:
webroot: ${{ github.workspace }}/custom/bundle-test
execute: /index.cfm
luceeVersionQuery: ${{ matrix.luceeVersion }}
env:
LUCEE_CLI_PRINTEXCEPTIONS: TRUE
LUCEE_ENABLE_BUNDLE_DOWNLOAD: FALSE

27 changes: 27 additions & 0 deletions custom/bundle-test/index.cfm
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<cfscript>
systemOutput( "--- Bundle Test ---- " );
systemOutput( "--- extensions are loaded on demand, so let's trigger them ---- " );
systemOutput( "", true );
systemOutput( "ESAPI", true );
encodeForHTML( "lucee" );
systemOutput( "", true );
systemOutput( "CFZIP", true );
file = getTempFile(getTempDirectory(), "test", "text" );
zip action="zip" source="#file#" file="#getTempFile(getTempDirectory(), "test", "zip")#";
systemOutput( "", true );
systemOutput( "PDF", true );
isPDFObject( file );
systemOutput( "", true );
systemOutput( "S3", true );
s3exists( bucketName="test", objectName="test", accessKeyId="test", secretAccessKey="test" ); // will throw
systemOutput( "", true );
systemOutput( "Argon", true );
generateArgon2Hash( "lucee" );
systemOutput( "--- finished ---- " );
</cfscript>

0 comments on commit 025e300

Please sign in to comment.