Skip to content

Commit b4e8199

Browse files
committed
boxlang cert
1 parent baf5148 commit b4e8199

11 files changed

+122
-72
lines changed

.github/workflows/cron.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Daily Tests
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *' # Runs at 00:00 UTC every day
6+
7+
jobs:
8+
tests:
9+
uses: ./.github/workflows/tests.yml
10+
secrets: inherit

.github/workflows/pr.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ on:
66
- "main"
77
- "master"
88
- "development"
9-
- "releases/v*"
109
pull_request:
1110
branches:
12-
- "releases/v*"
1311
- development
1412

1513
jobs:
1614
tests:
1715
uses: ./.github/workflows/tests.yml
16+
secrets: inherit
1817

19-
formatCheck:
18+
# Format PR
19+
format_check:
2020
name: Checks Source Code Formatting
2121
runs-on: ubuntu-24.04
2222
steps:
2323
- name: Checkout Repository
24-
uses: actions/checkout@v3
24+
uses: actions/checkout@v4
2525

2626
- uses: Ortus-Solutions/[email protected]
2727
with:

.github/workflows/release.yml

+44-12
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,13 @@ on:
1616
default: false
1717
type: boolean
1818

19+
# Manual Trigger
20+
workflow_dispatch:
1921
env:
20-
MODULE_ID: bcrypt
22+
MODULE_ID: ${{ github.event.repository.name }}
23+
JDK: 21
2124
SNAPSHOT: ${{ inputs.snapshot || false }}
25+
BUILD_ID: ${{ github.run_number }}
2226

2327
jobs:
2428
##########################################################################################
@@ -27,15 +31,26 @@ jobs:
2731
build:
2832
name: Build & Publish
2933
runs-on: ubuntu-24.04
34+
permissions:
35+
checks: write
36+
pull-requests: write
37+
contents: write
38+
issues: write
3039
steps:
3140
- name: Checkout Repository
32-
uses: actions/checkout@v3
41+
uses: actions/checkout@v4
3342

3443
- name: Setup CommandBox
3544
uses: Ortus-Solutions/[email protected]
3645
with:
3746
forgeboxAPIKey: ${{ secrets.FORGEBOX_TOKEN }}
3847

48+
- name: Setup Java
49+
uses: actions/setup-java@v4
50+
with:
51+
distribution: "temurin"
52+
java-version: ${{ env.JDK }}
53+
3954
- name: "Setup Environment Variables For Build Process"
4055
id: current_version
4156
run: |
@@ -50,7 +65,7 @@ jobs:
5065
fi
5166
5267
- name: Update changelog [unreleased] with latest version
53-
uses: thomaseizinger/keep-a-changelog-new-release@1.3.0
68+
uses: thomaseizinger/keep-a-changelog-new-release@3.1.0
5469
if: env.SNAPSHOT == 'false'
5570
with:
5671
changelogPath: ./changelog.md
@@ -61,10 +76,10 @@ jobs:
6176
npm install -g markdownlint-cli
6277
markdownlint changelog.md --fix
6378
box install commandbox-docbox
64-
box task run taskfile=build/Build target=run :version=${{ env.VERSION }} :projectName=${{ env.MODULE_ID }} :buildID=${{ github.run_number }} :branch=${{ env.BRANCH }}
79+
box task run taskfile=build/Build target=run :version=${{ env.VERSION }} :projectName=${{ env.MODULE_ID }} :buildID=${{ env.BUILD_ID }} :branch=${{ env.BRANCH }}
6580
66-
- name: Commit Changelog To Master
67-
uses: EndBug/[email protected].1
81+
- name: Commit Changelog [unreleased] with latest version
82+
uses: EndBug/[email protected].4
6883
if: env.SNAPSHOT == 'false'
6984
with:
7085
author_name: Github Actions
@@ -73,7 +88,7 @@ jobs:
7388
add: changelog.md
7489

7590
- name: Tag Version
76-
uses: rickstaa/action-create-tag@v1.6.1
91+
uses: rickstaa/action-create-tag@v1.7.2
7792
if: env.SNAPSHOT == 'false'
7893
with:
7994
tag: "v${{ env.VERSION }}"
@@ -82,7 +97,7 @@ jobs:
8297

8398
- name: Upload Build Artifacts
8499
if: success()
85-
uses: actions/upload-artifact@v3
100+
uses: actions/upload-artifact@v4
86101
with:
87102
name: ${{ env.MODULE_ID }}
88103
path: |
@@ -118,7 +133,7 @@ jobs:
118133
box forgebox publish --force
119134
120135
- name: Create Github Release
121-
uses: taiki-e/create-gh-release-action@v1.6.2
136+
uses: taiki-e/create-gh-release-action@v1.8.2
122137
continue-on-error: true
123138
if: env.SNAPSHOT == 'false'
124139
with:
@@ -127,6 +142,18 @@ jobs:
127142
token: ${{ secrets.GITHUB_TOKEN }}
128143
ref: refs/tags/v${{ env.VERSION }}
129144

145+
- name: Inform Slack
146+
if: ${{ always() }}
147+
uses: rtCamp/action-slack-notify@v2
148+
env:
149+
SLACK_CHANNEL: coding
150+
SLACK_COLOR: ${{ job.status }} # or a specific color like 'green' or '#ff00ff'
151+
SLACK_ICON_EMOJI: ":bell:"
152+
SLACK_MESSAGE: "Module ${{ env.MODULE_ID }} v${{ env.VERSION }} Built with ${{ job.status }}!"
153+
SLACK_TITLE: "ColdBox Module ${{ env.MODULE_ID }}"
154+
SLACK_USERNAME: CI
155+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
156+
130157
##########################################################################################
131158
# Prep Next Release
132159
##########################################################################################
@@ -135,10 +162,15 @@ jobs:
135162
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
136163
runs-on: ubuntu-24.04
137164
needs: [ build ]
165+
permissions:
166+
checks: write
167+
pull-requests: write
168+
contents: write
169+
issues: write
138170
steps:
139171
# Checkout development
140172
- name: Checkout Repository
141-
uses: actions/checkout@v3
173+
uses: actions/checkout@v4
142174
with:
143175
ref: development
144176

@@ -148,7 +180,7 @@ jobs:
148180
forgeboxAPIKey: ${{ secrets.FORGEBOX_TOKEN }}
149181

150182
- name: Download build artifacts
151-
uses: actions/download-artifact@v2
183+
uses: actions/download-artifact@v4
152184
with:
153185
name: ${{ env.MODULE_ID }}
154186
path: .tmp
@@ -165,7 +197,7 @@ jobs:
165197
166198
# Commit it back to development
167199
- name: Commit Version Bump
168-
uses: EndBug/[email protected].1
200+
uses: EndBug/[email protected].4
169201
with:
170202
author_name: Github Actions
171203
author_email: [email protected]

.github/workflows/snapshot.yml

+16-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@ on:
44
push:
55
branches:
66
- 'development'
7+
78
workflow_dispatch:
89

10+
# Unique group name per workflow-branch/tag combo
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
13+
cancel-in-progress: true
14+
915
jobs:
1016
##########################################################################################
1117
# Module Tests
@@ -20,16 +26,19 @@ jobs:
2026
format:
2127
name: Code Auto-Formatting
2228
runs-on: ubuntu-24.04
29+
permissions:
30+
contents: write
31+
checks: write
2332
steps:
24-
- uses: actions/checkout@v3
33+
- uses: actions/checkout@v4
2534

2635
- name: Auto-format
2736
uses: Ortus-Solutions/[email protected]
2837
with:
2938
cmd: run-script format
3039

3140
- name: Commit Format Changes
32-
uses: stefanzweifel/git-auto-commit-action@v4
41+
uses: stefanzweifel/git-auto-commit-action@v5
3342
with:
3443
commit_message: Apply cfformat changes
3544

@@ -40,5 +49,10 @@ jobs:
4049
uses: ./.github/workflows/release.yml
4150
needs: [ tests, format ]
4251
secrets: inherit
52+
permissions:
53+
checks: write
54+
pull-requests: write
55+
contents: write
56+
issues: write
4357
with:
4458
snapshot: true

.github/workflows/tests.yml

+31-38
Original file line numberDiff line numberDiff line change
@@ -18,67 +18,60 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
cfengine: [ "lucee@5", "adobe@2018", "adobe@2021" ]
22-
coldboxVersion: [ "^6.0.0" ]
21+
cfengine: [ "boxlang-cfml@1", "lucee@5", "lucee@6", "adobe@2021", "adobe@2023" ]
22+
coldboxVersion: [ "^7.0.0" ]
2323
experimental: [ false ]
24+
# Experimental: ColdBox BE vs All Engines
2425
include:
25-
- cfengine: "adobe@2023"
26-
coldboxVersion: "^6.0.0"
27-
experimental: true
2826
- coldboxVersion: "be"
2927
cfengine: "lucee@5"
3028
experimental: true
3129
- coldboxVersion: "be"
32-
cfengine: "adobe@2018"
30+
cfengine: "lucee@6"
3331
experimental: true
3432
- coldboxVersion: "be"
3533
cfengine: "adobe@2021"
3634
experimental: true
3735
- coldboxVersion: "be"
38-
cfengine: "boxlang@1"
36+
cfengine: "adobe@2023"
37+
experimental: true
38+
- coldboxVersion: "be"
39+
cfengine: "boxlang-cfml@1"
3940
experimental: true
4041
steps:
4142
- name: Checkout Repository
42-
uses: actions/checkout@v3
43+
uses: actions/checkout@v4
4344

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

5152
- name: Setup Java
52-
uses: actions/setup-java@v3
53+
uses: actions/setup-java@v4
5354
with:
5455
distribution: "temurin"
55-
java-version: "11"
56+
java-version: "21"
57+
58+
- name: Setup Environment For Testing Process
59+
run: |
60+
# Setup .env
61+
touch .env
62+
# ENV
63+
printf "ENVIRONMENT=development\n" >> .env
64+
printf "DB_HOST=localhost\n" >> .env
65+
printf "DB_USER=${{ env.DB_USER }}\n" >> .env
66+
printf "DB_PASSWORD=${{ env.DB_PASSWORD }}\n" >> .env
67+
printf "DB_CLASS=com.mysql.cj.jdbc.Driver\n" >> .env
68+
printf "DB_BUNDLEVERSION=8.0.19\n" >> .env
69+
printf "DB_BUNDLENAME=com.mysql.cj\n" >> .env
5670
5771
- name: Setup CommandBox CLI
5872
uses: Ortus-Solutions/[email protected]
5973

60-
- name: Update Commandbox Boxlang Module
61-
if: ${{ matrix.cfengine == 'boxlang@1' }}
62-
run:
63-
box install --force commandbox-boxlang
64-
65-
# Not Needed in this module
66-
#- name: Setup Environment For Testing Process
67-
# working-directory: ./test-harness
68-
# run: |
69-
# # Setup .env
70-
# touch .env
71-
# # ENV
72-
# printf "DB_HOST=localhost\n" >> .env
73-
# printf "DB_DATABASE=mydatabase\n" >> .env
74-
# printf "DB_DRIVER=MySQL\n" >> .env
75-
# printf "DB_USER=${{ env.DB_USER }}\n" >> .env
76-
# printf "DB_PASSWORD=${{ env.DB_PASSWORD }}\n" >> .env
77-
# printf "DB_CLASS=com.mysql.cj.jdbc.Driver\n" >> .env
78-
# printf "DB_BUNDLEVERSION=8.0.19\n" >> .env
79-
# printf "DB_BUNDLENAME=com.mysql.cj\n" >> .env
80-
81-
- name: Install Test Harness with ColdBox ${{ matrix.coldboxVersion }}
74+
- name: Install Dependencies
8275
run: |
8376
box install
8477
cd test-harness

.markdownlint.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@
1010
},
1111
"no-duplicate-header" : {
1212
"siblings_only" : true
13-
}
14-
}
13+
},
14+
"no-duplicate-heading" : false,
15+
"no-inline-html" : false
16+
}

box.json

+2-6
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,9 @@
3131
"/server*.json"
3232
],
3333
"devDependencies":{
34+
"commandbox-boxlang":"*",
3435
"commandbox-cfformat":"*",
35-
"commandbox-docbox":"*",
36-
"commandbox-dotenv":"*",
37-
"commandbox-cfconfig":"*"
36+
"commandbox-docbox":"*"
3837
},
3938
"dependencies":{
4039
"cbjavaloader":"^2.0.0"
@@ -51,13 +50,10 @@
5150
"format:watch":"cfformat watch helpers,models,test-harness/tests/,ModuleConfig.cfc ./.cfformat.json",
5251
"format:check":"cfformat check helpers,models,test-harness/tests/,ModuleConfig.cfc ./.cfformat.json",
5352
"start:lucee" : "server start [email protected]",
54-
"start:2018" : "server start [email protected]",
5553
"start:2021" : "server start [email protected]",
5654
"stop:lucee" : "server stop [email protected]",
57-
"stop:2018" : "server stop [email protected]",
5855
"stop:2021" : "server stop [email protected]",
5956
"logs:lucee" : "server log [email protected] --follow",
60-
"logs:2018" : "server log [email protected] --follow",
6157
"logs:2021" : "server log [email protected] --follow"
6258
}
6359
}

build/Build.cfc

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ component {
1212
variables.cwd = getCWD().reReplace( "\.$", "" );
1313
variables.artifactsDir = cwd & "/.artifacts";
1414
variables.buildDir = cwd & "/.tmp";
15+
variables.apidDocsDir = variables.buildDir & "/apidocs";
1516
variables.apiDocsURL = "http://localhost:60299/apidocs/";
1617
variables.testRunner = "http://localhost:60299/tests/runner.cfm";
1718

@@ -31,7 +32,8 @@ component {
3132
// Cleanup + Init Build Directories
3233
[
3334
variables.buildDir,
34-
variables.artifactsDir
35+
variables.artifactsDir,
36+
variables.apidDocsDir
3537
].each( function( item ){
3638
if ( directoryExists( item ) ) {
3739
directoryDelete( item, true );

changelog.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111

12+
- BoxLang updates
1213
- Github action updates
1314
- ColdBox 7 auto-testing
1415

0 commit comments

Comments
 (0)