Skip to content

Check Bad .CFConfigs #62

Check Bad .CFConfigs

Check Bad .CFConfigs #62

Workflow file for this run

name: Check Bad .CFConfigs
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
if: always()
with:
path: /home/runner/work/_actions/lucee/script-runner/main/lucee-download-cache
key: lucee-downloads
- name: Check good .CFConfig.json LUCEE_BASE_CONFIG
uses: lucee/script-runner@main
if: always()
with:
webroot: ${{ github.workspace }}/custom/bad-cfconfig
execute: /debug.cfm
luceeVersionQuery: ${{ matrix.luceeVersion }}
compile: true
env:
LUCEE_BASE_CONFIG: ${{ github.workspace }}/custom/bad-cfconfig/.CFConfig-good.json5
check_extensions: B737ABC4-D43F-4D91-8E8E973E37C40D1B:2.0.0.26
- name: Copy .CFConfig-good.json5 into context
if: always()
run: |
mkdir -p /home/runner/work/_actions/lucee/script-runner/main/temp/lucee/lucee-server/context/
cp -a ${{ github.workspace }}/custom/bad-cfconfig/.CFConfig-good.json5 /home/runner/work/_actions/lucee/script-runner/main/temp/lucee/lucee-server/context/.CFConfig.json
- name: Check good .CFConfig.json (via context)
uses: lucee/script-runner@main
if: always()
with:
webroot: ${{ github.workspace }}/custom/bad-cfconfig
execute: /debug.cfm
luceeVersionQuery: ${{ matrix.luceeVersion }}
preCleanup: false
env:
check_extensions: B737ABC4-D43F-4D91-8E8E973E37C40D1B:2.0.0.26
- name: Check good .CFConfig with newer image extension LUCEE_BASE_CONFIG
uses: lucee/script-runner@main
if: always()
with:
webroot: ${{ github.workspace }}/custom/bad-cfconfig
execute: /debug.cfm
luceeVersionQuery: ${{ matrix.luceeVersion }}
env:
LUCEE_BASE_CONFIG: ${{ github.workspace }}/custom/bad-cfconfig/.CFConfig-newer-extension.json5
check_extensions: B737ABC4-D43F-4D91-8E8E973E37C40D1B:2.0.0.28-SNAPSHOT
- name: Copy .CFConfig-newer-extension.json5 into context
if: always()
run: |
mkdir -p /home/runner/work/_actions/lucee/script-runner/main/temp/lucee/lucee-server/context/
cp -a ${{ github.workspace }}/custom/bad-cfconfig/.CFConfig-newer-extension.json5 /home/runner/work/_actions/lucee/script-runner/main/temp/lucee/lucee-server/context/.CFConfig.json
- name: Check good .CFConfig with newer image extension ( via context )
uses: lucee/script-runner@main
if: always()
with:
webroot: ${{ github.workspace }}/custom/bad-cfconfig
execute: /debug.cfm
luceeVersionQuery: ${{ matrix.luceeVersion }}
preCleanup: false
env:
check_extensions: B737ABC4-D43F-4D91-8E8E973E37C40D1B:2.0.0.28-SNAPSHOT
- name: Copy .CFConfig-newer-extension.json5 into /deploy
if: always()
run: |
mkdir -p /home/runner/work/_actions/lucee/script-runner/main/temp/lucee/lucee-server/deploy/
cp -a ${{ github.workspace }}/custom/bad-cfconfig/.CFConfig-newer-extension.json5 /home/runner/work/_actions/lucee/script-runner/main/temp/lucee/lucee-server/deploy/.CFConfig.json
- name: Check good .CFConfig with newer image extension ( via /deploy )
uses: lucee/script-runner@main
if: always()
with:
webroot: ${{ github.workspace }}/custom/bad-cfconfig
execute: /debug.cfm
luceeVersionQuery: ${{ matrix.luceeVersion }}
preCleanup: false
env:
check_extensions: B737ABC4-D43F-4D91-8E8E973E37C40D1B:2.0.0.28-SNAPSHOT
check_extensions_since: 6.1.1
- name: Copy .CFConfig-empty-cacheHandlers.json5 into /deploy
if: always()
run: |
mkdir -p /home/runner/work/_actions/lucee/script-runner/main/temp/lucee/lucee-server/deploy/
cp -a ${{ github.workspace }}/custom/bad-cfconfig/.CFConfig-empty-cacheHandlers.json /home/runner/work/_actions/lucee/script-runner/main/temp/lucee/lucee-server/deploy/.CFConfig.json
- name: Check .CFConfig with empty cacheHandlers ( via /deploy )
uses: lucee/script-runner@main
if: always()
with:
webroot: ${{ github.workspace }}/custom/bad-cfconfig
execute: /debug.cfm
luceeVersionQuery: ${{ matrix.luceeVersion }}
preCleanup: false
env:
expect_empty_config: cacheHandlers
- name: Check bad .CFConfig with unknown extension version LUCEE_BASE_CONFIG
uses: lucee/script-runner@main
if: always()
with:
webroot: ${{ github.workspace }}/custom/bad-cfconfig
execute: /debug.cfm
luceeVersionQuery: ${{ matrix.luceeVersion }}
env:
LUCEE_BASE_CONFIG: ${{ github.workspace }}/custom/bad-cfconfig/.CFConfig-bad-extension.json5
- name: Check bad .CFConfig with invalid json5? due to a comment LUCEE_BASE_CONFIG
uses: lucee/script-runner@main
if: always()
with:
webroot: ${{ github.workspace }}/custom/bad-cfconfig
execute: /debug.cfm
luceeVersionQuery: ${{ matrix.luceeVersion }}
env:
LUCEE_BASE_CONFIG: ${{ github.workspace }}/custom/bad-cfconfig/.CFConfig-bad-comment.json5
check_extensions: -D46B46A9-A0E3-44E1-D972A04AC3A8DC10:1.0.19.25
- name: Check bad .CFConfig missing file LUCEE_BASE_CONFIG
uses: lucee/script-runner@main
if: always()
with:
webroot: ${{ github.workspace }}/custom/bad-cfconfig
execute: /debug.cfm
luceeVersionQuery: ${{ matrix.luceeVersion }}
env:
LUCEE_BASE_CONFIG: ${{ github.workspace }}/custom/bad-cfconfig/.CFConfig-404.json5
- name: Copy .CFConfig-bad-extension.json5 into context (s3 ext)
if: always()
run: |
mkdir -p /home/runner/work/_actions/lucee/script-runner/main/temp/lucee/lucee-server/context/
cp -a ${{ github.workspace }}/custom/bad-cfconfig/.CFConfig-bad-extension.json5 /home/runner/work/_actions/lucee/script-runner/main/temp/lucee/lucee-server/context/.CFConfig.json
- name: Check bad .CFConfig with wrong version number for bundled s3 extension (via context)
uses: lucee/script-runner@main
if: always()
with:
webroot: ${{ github.workspace }}/custom/bad-cfconfig
execute: /debug.cfm
luceeVersionQuery: ${{ matrix.luceeVersion }}
preCleanup: false
env:
check_extensions: -17AB52DE-B300-A94B-E058BD978511E39E:0.0.404.404
- name: Copy .CFConfig-bad-extension.json5 into context (chart ext)
if: always()
run: |
mkdir -p /home/runner/work/_actions/lucee/script-runner/main/temp/lucee/lucee-server/context/
cp -a ${{ github.workspace }}/custom/bad-cfconfig/.CFConfig-bad-extension-404.json5 /home/runner/work/_actions/lucee/script-runner/main/temp/lucee/lucee-server/context/.CFConfig.json
- name: Check bad .CFConfig with wrong version number for unbundled chart extension (via context)
uses: lucee/script-runner@main
if: always()
with:
webroot: ${{ github.workspace }}/custom/bad-cfconfig
execute: /debug.cfm
luceeVersionQuery: ${{ matrix.luceeVersion }}
preCleanup: false
env:
check_extensions: -D46B46A9-A0E3-44E1-D972A04AC3A8DC10:0.0.404.404