Skip to content

Commit

Permalink
Merge pull request #12 from coldbox-modules/development
Browse files Browse the repository at this point in the history
version bump
  • Loading branch information
lmajano authored Feb 20, 2025
2 parents ad4fc5d + a7e615d commit 3c99bab
Show file tree
Hide file tree
Showing 15 changed files with 153 additions and 82 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Daily Tests

on:
schedule:
- cron: '0 0 * * *' # Runs at 00:00 UTC every day

jobs:
tests:
uses: ./.github/workflows/tests.yml
secrets: inherit
8 changes: 4 additions & 4 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ on:
- "main"
- "master"
- "development"
- "releases/v*"
pull_request:
branches:
- "releases/v*"
- development

jobs:
tests:
uses: ./.github/workflows/tests.yml
secrets: inherit

formatCheck:
# Format PR
format_check:
name: Checks Source Code Formatting
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand Down
54 changes: 43 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,26 @@ on:
default: false
type: boolean

# Manual Trigger
workflow_dispatch:
env:
MODULE_ID: route-visualizer
MODULE_ID: ${{ github.event.repository.name }}
JDK: 21
SNAPSHOT: ${{ inputs.snapshot || false }}
BUILD_ID: ${{ github.run_number }}

jobs:
##########################################################################################
# Build & Publish
##########################################################################################
build:
name: Build & Publish
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
permissions:
checks: write
pull-requests: write
contents: write
issues: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand All @@ -36,6 +45,12 @@ jobs:
with:
forgeboxAPIKey: ${{ secrets.FORGEBOX_TOKEN }}

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: ${{ env.JDK }}

- name: "Setup Environment Variables For Build Process"
id: current_version
run: |
Expand All @@ -50,7 +65,7 @@ jobs:
fi
- name: Update changelog [unreleased] with latest version
uses: thomaseizinger/keep-a-changelog-new-release@1.3.0
uses: thomaseizinger/keep-a-changelog-new-release@3.1.0
if: env.SNAPSHOT == 'false'
with:
changelogPath: ./changelog.md
Expand All @@ -61,10 +76,10 @@ jobs:
npm install -g markdownlint-cli
markdownlint changelog.md --fix
box install commandbox-docbox
box task run taskfile=build/Build target=run :version=${{ env.VERSION }} :projectName=${{ env.MODULE_ID }} :buildID=${{ github.run_number }} :branch=${{ env.BRANCH }}
box task run taskfile=build/Build target=run :version=${{ env.VERSION }} :projectName=${{ env.MODULE_ID }} :buildID=${{ env.BUILD_ID }} :branch=${{ env.BRANCH }}
- name: Commit Changelog To Master
uses: EndBug/[email protected].1
- name: Commit Changelog [unreleased] with latest version
uses: EndBug/[email protected].4
if: env.SNAPSHOT == 'false'
with:
author_name: Github Actions
Expand All @@ -73,7 +88,7 @@ jobs:
add: changelog.md

- name: Tag Version
uses: rickstaa/action-create-tag@v1.6.1
uses: rickstaa/action-create-tag@v1.7.2
if: env.SNAPSHOT == 'false'
with:
tag: "v${{ env.VERSION }}"
Expand Down Expand Up @@ -118,7 +133,7 @@ jobs:
box forgebox publish --force
- name: Create Github Release
uses: taiki-e/create-gh-release-action@v1.6.2
uses: taiki-e/create-gh-release-action@v1.8.2
continue-on-error: true
if: env.SNAPSHOT == 'false'
with:
Expand All @@ -127,14 +142,31 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
ref: refs/tags/v${{ env.VERSION }}

- name: Inform Slack
if: ${{ always() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: coding
SLACK_COLOR: ${{ job.status }} # or a specific color like 'green' or '#ff00ff'
SLACK_ICON_EMOJI: ":bell:"
SLACK_MESSAGE: "Module ${{ env.MODULE_ID }} v${{ env.VERSION }} Built with ${{ job.status }}!"
SLACK_TITLE: "ColdBox Module ${{ env.MODULE_ID }}"
SLACK_USERNAME: CI
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}

##########################################################################################
# Prep Next Release
##########################################################################################
prep_next_release:
name: Prep Next Release
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
needs: [ build ]
permissions:
checks: write
pull-requests: write
contents: write
issues: write
steps:
# Checkout development
- name: Checkout Repository
Expand All @@ -148,7 +180,7 @@ jobs:
forgeboxAPIKey: ${{ secrets.FORGEBOX_TOKEN }}

- name: Download build artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: ${{ env.MODULE_ID }}
path: .tmp
Expand All @@ -165,7 +197,7 @@ jobs:
# Commit it back to development
- name: Commit Version Bump
uses: EndBug/[email protected].1
uses: EndBug/[email protected].4
with:
author_name: Github Actions
author_email: [email protected]
Expand Down
17 changes: 16 additions & 1 deletion .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ on:
branches:
- 'development'

workflow_dispatch:

# Unique group name per workflow-branch/tag combo
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
##########################################################################################
# Module Tests
Expand All @@ -18,7 +25,10 @@ jobs:
##########################################################################################
format:
name: Code Auto-Formatting
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
permissions:
contents: write
checks: write
steps:
- uses: actions/checkout@v4

Expand All @@ -39,5 +49,10 @@ jobs:
uses: ./.github/workflows/release.yml
needs: [ tests, format ]
secrets: inherit
permissions:
checks: write
pull-requests: write
contents: write
issues: write
with:
snapshot: true
62 changes: 30 additions & 32 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,70 +10,68 @@ on:
jobs:
tests:
name: Tests
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
env:
DB_USER: root
DB_PASSWORD: root
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
cfengine: [ "lucee@5", "adobe@2018", "adobe@2021", "adobe@2023" ]
coldboxVersion: [ "^6.0.0", "^7.0.0" ]
cfengine: [ "boxlang-cfml@1", "lucee@5", "lucee@6", "adobe@2021", "adobe@2023" ]
coldboxVersion: [ "^7.0.0" ]
experimental: [ false ]
# Experimental: ColdBox BE vs All Engines
include:
- coldboxVersion: "^7.0.0"
cfengine: "lucee@6"
experimental: true
- coldboxVersion: "be"
cfengine: "lucee@5"
experimental: true
- coldboxVersion: "be"
cfengine: "adobe@2018"
cfengine: "lucee@6"
experimental: true
- coldboxVersion: "be"
cfengine: "adobe@2021"
experimental: true
- coldboxVersion: "be"
cfengine: "adobe@2023"
experimental: true
- coldboxVersion: "be"
cfengine: "boxlang-cfml@1"
experimental: true
steps:
- name: Checkout Repository
uses: actions/checkout@v4

# Not Needed in this module
#- name: Setup Database and Fixtures
# run: |
# sudo /etc/init.d/mysql start
# mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} -e 'CREATE DATABASE coolblog;'
# mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} < test-harness/tests/resources/coolblog.sql
# DATABASE SETUP: uncomment if you need to setup a database
# - name: Setup Database and Fixtures
# run: |
# sudo systemctl start mysql.service
# mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} -e 'CREATE DATABASE mementifier;'
# mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} < test-harness/tests/resources/coolblog.sql

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "11"
java-version: "21"

- name: Setup Environment For Testing Process
run: |
# Setup .env
touch .env
# ENV
printf "ENVIRONMENT=development\n" >> .env
printf "DB_HOST=localhost\n" >> .env
printf "DB_USER=${{ env.DB_USER }}\n" >> .env
printf "DB_PASSWORD=${{ env.DB_PASSWORD }}\n" >> .env
printf "DB_CLASS=com.mysql.cj.jdbc.Driver\n" >> .env
printf "DB_BUNDLEVERSION=8.0.19\n" >> .env
printf "DB_BUNDLENAME=com.mysql.cj\n" >> .env
- name: Setup CommandBox CLI
uses: Ortus-Solutions/[email protected]

# Not Needed in this module
#- name: Setup Environment For Testing Process
# working-directory: ./test-harness
# run: |
# # Setup .env
# touch .env
# # ENV
# printf "DB_HOST=localhost\n" >> .env
# printf "DB_DATABASE=mydatabase\n" >> .env
# printf "DB_DRIVER=MySQL\n" >> .env
# printf "DB_USER=${{ env.DB_USER }}\n" >> .env
# printf "DB_PASSWORD=${{ env.DB_PASSWORD }}\n" >> .env
# printf "DB_CLASS=com.mysql.cj.jdbc.Driver\n" >> .env
# printf "DB_BUNDLEVERSION=8.0.19\n" >> .env
# printf "DB_BUNDLENAME=com.mysql.cj\n" >> .env

- name: Install Test Harness with ColdBox ${{ matrix.coldboxVersion }}
- name: Install Dependencies
run: |
box install
cd test-harness
Expand Down
2 changes: 1 addition & 1 deletion .markdownlint.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"no-multiple-blanks": {
"maximum": 2
},
"no-duplicate-heading" : false,
"no-duplicate-header" : {
"siblings_only" : true
},
"no-duplicate-heading" : false,
"no-inline-html" : false
}
2 changes: 1 addition & 1 deletion ModuleConfig.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ component {
router.route( "/" ).to( "Home.index" );

// Layout Settings
layoutSettings = { defaultLayout : "Main.cfm" };
layoutSettings = { defaultLayout : "Main" };
}

/**
Expand Down
8 changes: 5 additions & 3 deletions box.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
"test-harness",
"/server*.json"
],
"devDependencies" :{
"commandbox-boxlang":"*",
"commandbox-cfformat":"*",
"commandbox-docbox":"*"
},
"scripts":{
"setupTemplate":"task run taskFile=build/SetupTemplate.cfc",
"build:module":"task run taskFile=build/Build.cfc :projectName=`package show slug` :version=`package show version`",
Expand All @@ -36,13 +41,10 @@
"format:watch":"cfformat watch helpers,models,test-harness/tests/,ModuleConfig.cfc ./.cfformat.json",
"format:check":"cfformat check helpers,models,test-harness/tests/,ModuleConfig.cfc ./.cfformat.json",
"start:lucee" : "server start [email protected]",
"start:2018" : "server start [email protected]",
"start:2021" : "server start [email protected]",
"stop:lucee" : "server stop [email protected]",
"stop:2018" : "server stop [email protected]",
"stop:2021" : "server stop [email protected]",
"logs:lucee" : "server log [email protected] --follow",
"logs:2018" : "server log [email protected] --follow",
"logs:2021" : "server log [email protected] --follow"
},
"testbox":{
Expand Down
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- BoxLang support
- Adobe 2023 Support
- Lucee 6 Support
- More testing coverage

### Fixed

- Update to support BoxLang and CFML layouts
- Update all `renderView()` calls to use `view()` instead

## [2.1.0]
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ Apache License, Version 2.0.

## SYSTEM REQUIREMENTS

- BoxLang 1+
- Lucee 5+
- Adobe ColdFusion 2018+
- ColdBox 6+
- Adobe ColdFusion 2021+

## Instructions

Expand Down
Loading

0 comments on commit 3c99bab

Please sign in to comment.