Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version bump #65

Merged
merged 20 commits into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
9 changes: 4 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,22 @@ 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@v3
uses: actions/checkout@v4

- uses: Ortus-Solutions/[email protected]
with:
Expand Down
44 changes: 38 additions & 6 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: cborm
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@3.0.0
uses: thomaseizinger/keep-a-changelog-new-release@3.1.0
if: env.SNAPSHOT == 'false'
with:
changelogPath: ./changelog.md
Expand All @@ -61,9 +76,9 @@ 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
- name: Commit Changelog [unreleased] with latest version
uses: EndBug/[email protected]
if: env.SNAPSHOT == 'false'
with:
Expand Down Expand Up @@ -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 Down
21 changes: 18 additions & 3 deletions .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,17 +25,20 @@ 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@v3
- uses: actions/checkout@v4

- name: Auto-format
uses: Ortus-Solutions/[email protected]
with:
cmd: run-script format

- name: Commit Format Changes
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply cfformat changes

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
26 changes: 15 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,47 +10,51 @@ 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: [ "lucee@5", "adobe@2021", "adobe@2023" ]
coldboxVersion: [ "^7.0.0" ]
experimental: [ false ]
# Experimental: ColdBox BE vs All Engines
include:
- coldboxVersion: "be"
cfengine: "lucee@5"
experimental: true
- coldboxVersion: "be"
cfengine: "lucee@6"
experimental: true
- coldboxVersion: "be"
cfengine: "adobe@2021"
experimental: true
- coldboxVersion: "be"
cfengine: "adobe@2023"
experimental: true
- coldboxVersion: "be"
cfengine: "adobe@2021"
cfengine: "boxlang-cfml@1"
experimental: true
steps:
- name: Checkout Repository
uses: actions/checkout@v4

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

- name: Setup Database and Fixtures
run: |
sudo systemctl start mysql.service
# Create Database
mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} -e 'CREATE DATABASE coolblog;'
# Import Database
mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} < test-harness/tests/resources/coolblog.sql
sudo systemctl start mysql.service
# Create Database
mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} -e 'CREATE DATABASE coolblog;'
# Import Database
mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} < test-harness/tests/resources/coolblog.sql

- name: Setup Environment For Testing Process
run: |
Expand Down
15 changes: 8 additions & 7 deletions box.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name":"ColdBox ORM Extensions",
"version":"4.5.0",
"version":"4.6.0",
"location":"https://downloads.ortussolutions.com/ortussolutions/coldbox-modules/cborm/@build.version@/[email protected]@.zip",
"author":"Ortus Solutions <[email protected]",
"homepage":"https://github.com/coldbox-modules/cborm",
Expand Down Expand Up @@ -32,6 +32,7 @@
"cbpaginator":"^2.0.0"
},
"devDependencies":{
"commandbox-boxlang":"*",
"commandbox-cfformat":"*",
"commandbox-docbox":"*",
"commandbox-dotenv":"*",
Expand All @@ -54,18 +55,18 @@
"format:check":"cfformat check aop,dsl,interceptors,models,test-harness/tests/,ModuleConfig.cfc ./.cfformat.json",
"install:dependencies":"install && cd test-harness && install",
"startdbs":"!docker-compose -f docker-compose.yml up",
"start:boxlang":"server start [email protected]",
"start:lucee":"server start [email protected]",
"start:2018":"server start [email protected]",
"start:2021":"server start [email protected]",
"start:2023":"server start [email protected]",
"start:2023":"server start [email protected]",
"stop:boxlang":"server stop [email protected]",
"stop:lucee":"server stop [email protected]",
"stop:2018":"server stop [email protected]",
"stop:2021":"server stop [email protected]",
"stop:2023":"server stop [email protected]",
"stop:2023":"server stop [email protected]",
"logs:boxlang":"server log [email protected] --follow",
"logs:lucee":"server log [email protected] --follow",
"logs:2018":"server log [email protected] --follow",
"logs:2021":"server log [email protected] --follow",
"logs:2023":"server log [email protected] --follow"
"logs:2023":"server log [email protected] --follow"
},
"installPaths":{
"cbvalidation":"modules/cbvalidation/",
Expand Down
15 changes: 15 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- [CBORM-37](https://ortussolutions.atlassian.net/browse/CBORM-37) - Fixed issue on `PostLoad` event handler for multi-datasource entities
- Removal of old deprecated engines

### Added

- BoxLang auto-testing
- Added several flow helpers to `ActiveEntity`:
- `peek( closure )` to allow for peeking into the building process. Pass in your closure that receives the entity and interact with it.
- `when( boolean, successClosure, failureClosure )` that you can use to build functional entities without the use of if statements.
- `unless( boolean, successClosure, failureClosure )` that you can use to build functional entities without the use of if statements. The opposite of `when()`.
- `throwIf( boolean, type, [message], [detail] )` that you can use to throw an exception if a condition is met.
- `throwUnless( boolean, type, [message], [detail] )` that you can use to throw an exception if a condition is not met.

## [4.5.0] - 2024-06-25

### Added
Expand Down
Loading
Loading