Skip to content

Run Coldbox test suite #28

Run Coldbox test suite

Run Coldbox test suite #28

Workflow file for this run

name: Run Coldbox test suite
on:
workflow_dispatch:
inputs:
compile:
required: false
default: false
type: boolean
workflow_call:
jobs:
setup-coldbox:
runs-on: ubuntu-latest
steps:
- name: Checkout coldbox Repository
uses: actions/checkout@v4
with:
repository: ColdBox/coldbox-platform
- name: Checkout
uses: actions/checkout@v4
with:
path: _custom
- name: Copy custom test runner tweaks
run: |
cp -a _custom/custom/coldbox/.CFConfig.json .
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'temurin'
- name: Install the ortus security key
run: curl -fsSl https://downloads.ortussolutions.com/debs/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/ortussolutions.gpg > /dev/null
- name: Add the commandbox source
run: echo "deb [signed-by=/usr/share/keyrings/ortussolutions.gpg] https://downloads.ortussolutions.com/debs/noarch /" | sudo tee /etc/apt/sources.list.d/commandbox.list
- name: Update apt and install commandbox
run: sudo apt-get update && sudo apt-get install apt-transport-https commandbox
- name: Install dependencies
run: |
box install verbose=true system=false
- name: installed webroot for matrix steps
uses: actions/upload-artifact@v4
with:
name: webroot
path: ${{ github.workspace }}
run-coldbox-tests:
name: Coldbox Test
runs-on: ubuntu-latest
needs: [ setup-coldbox ]
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, 21 ]
exclude:
- luceeVersion: 5.4/snapshot/jar
javaVersion: 21
- luceeVersion: 6.0/snapshot/jar
javaVersion: 21
env:
luceeVersionQuery: ${{ matrix.luceeVersion }}
compile: ${{ github.event.inputs.compile }}
steps:
- name: Restore pre-prepared webroot
uses: actions/download-artifact@v4
with:
name: webroot
path: ${{ github.workspace }}
- name: Set up JDK ${{ matrix.javaVersion }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.javaVersion }}
distribution: 'adopt'
- 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: Set up MySQL (local)
run: |
sudo systemctl start mysql
mysql -e 'CREATE DATABASE coolblog' -uroot -proot
mysql -e 'CREATE USER "coldbox"@"localhost" IDENTIFIED WITH mysql_native_password BY "coldbox";' -uroot -proot
mysql -e 'GRANT ALL PRIVILEGES ON coolblog.* TO "coldbox"@"localhost"' -uroot -proot
ls -la
cat .CFConfig.json
- name: Run Coldbox Test Suite
uses: lucee/script-runner@main
with:
webroot: ${{ github.workspace }}
execute: /test-harness/index.cfm
luceeVersionQuery: ${{ env.luceeVersionQuery }}
extensions: D062D72F-F8A2-46F0-8CBC91325B2F067B #orm
compile: ${{env.compile}}
luceeCFConfig: ${{ github.workspace }}/.CFConfig.json
env:
DB_PORT: 3306
DB_HOST: localhost
DB_USER: coldbox
DB_PASSWORD: coldbox
DB_CLASS: com.mysql.cj.jdbc.Driver
DB_BUNDLENAME: com.mysql.cj
DB_BUNDLEVERSION: 8.4.0
DB_NAME: coolblog
LUCEE_BASE_CONFIG: ${{ github.workspace }}/.CFConfig.json