Skip to content

Commit

Permalink
add presidecms
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Jun 8, 2024
1 parent f99cef4 commit 0dffdc6
Show file tree
Hide file tree
Showing 2 changed files with 523 additions and 0 deletions.
102 changes: 102 additions & 0 deletions .github/workflows/presidecms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Run PresideCMS test suite
on:
workflow_dispatch:
push:
jobs:
setup-presidecms:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout PresideCMS Repository
uses: actions/checkout@v4
with:
repository: pixl8/Preside-CMS
path: src
- name: Copy custom test runner tweaks
run: |
cp -R custom/presidecms src
- 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: |
cd src
box install
- name: installed webroot for matrix steps
uses: actions/upload-artifact@v4
with:
name: webroot
path: ${{ github.workspace }}/src

run-preside-tests:
name: Preside CI
runs-on: ubuntu-latest
needs: [ setup-presidecms ]
strategy:
fail-fast: false
matrix:
luceeVersion: [ 5.4/snapshot/jar, 6.0/snapshot/jar, 6.1/snapshot/jar ]
javaVersion: [ 11, 21 ]
exclude:
- luceeVersion: 5.4/snapshot/jar
javaVersion: 21
- luceeVersion: 6.0/snapshot/jar
javaVersion: 21
env:
luceeVersionQuery: ${{ matrix.luceeVersion }}
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 preside_test' -uroot -proot
mysql -e 'CREATE USER "preside"@"localhost" IDENTIFIED WITH mysql_native_password BY "preside";' -uroot -proot
mysql -e 'GRANT ALL PRIVILEGES ON preside_test.* TO "preside"@"localhost"' -uroot -proot
- name: chown testbox/system/stubs/ to runner
run: |
# /home/runner/work/Preside-CMS/Preside-CMS/tests/testbox/system/stubs/ is owned by root
sudo chown -R runner:docker tests/testbox/system/stubs/
- name: Run Preside CMS Test Suite
uses: lucee/script-runner@main
with:
webroot: ${{ github.workspace }}
execute: /tests/runtests.cfm
luceeVersionQuery: ${{ env.luceeVersionQuery }}
env:
PRESIDETEST_DB_PORT: 3306
PRESIDETEST_DB_HOST: localhost
PRESIDETEST_DB_USER: preside
PRESIDETEST_DB_PASSWORD: preside
PRESIDETEST_DB_NAME: preside_test
LUCEE_BASE_CONFIG: ${{ github.workspace }}/tests/.cfconfig.json
Loading

0 comments on commit 0dffdc6

Please sign in to comment.