-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
136 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,26 @@ | ||
name: Weekly Test Engines | ||
name: Daily Tests | ||
|
||
on: | ||
schedule: | ||
- cron: '0 8 * * 4' | ||
schedule: | ||
- cron: '0 0 * * *' # Runs at 00:00 UTC every day | ||
|
||
jobs: | ||
tests: | ||
|
||
uses: ./.github/workflows/tests.yml | ||
secrets: inherit | ||
tests: | ||
uses: ./.github/workflows/tests.yml | ||
secrets: inherit | ||
|
||
notify: | ||
needs: [ tests ] | ||
runs-on: ubuntu-24.04 | ||
if: ${{ always() }} | ||
steps: | ||
- name: Slack Notifications | ||
uses: rtCamp/action-slack-notify@v2 | ||
env: | ||
SLACK_CHANNEL: boxlang-cron | ||
SLACK_COLOR: ${{ job.status }} # or a specific color like 'green' or '#ff00ff' | ||
SLACK_ICON_EMOJI: ":bell:" | ||
SLACK_MESSAGE: '${{ github.repository }} weekly tests' | ||
SLACK_TITLE: ${{ github.repository }} Tests results | ||
SLACK_USERNAME: CI | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
notify: | ||
needs: [ tests ] | ||
runs-on: ubuntu-24.04 | ||
if: ${{ always() }} | ||
steps: | ||
- name: Slack Notifications | ||
uses: rtCamp/action-slack-notify@v2 | ||
env: | ||
SLACK_CHANNEL: boxlang-cron | ||
SLACK_COLOR: ${{ job.status }} # or a specific color like 'green' or '#ff00ff' | ||
SLACK_ICON_EMOJI: ":bell:" | ||
SLACK_MESSAGE: '${{ github.repository }} weekly tests' | ||
SLACK_TITLE: ${{ github.repository }} Tests results | ||
SLACK_USERNAME: CI | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,9 +16,13 @@ on: | |
default: false | ||
type: boolean | ||
|
||
# Manual Trigger | ||
workflow_dispatch: | ||
env: | ||
MODULE_ID: cbsecurity | ||
MODULE_ID: ${{ github.event.repository.name }} | ||
JDK: 21 | ||
SNAPSHOT: ${{ inputs.snapshot || false }} | ||
BUILD_ID: ${{ github.run_number }} | ||
|
||
jobs: | ||
########################################################################################## | ||
|
@@ -27,6 +31,11 @@ jobs: | |
build: | ||
name: Build & Publish | ||
runs-on: ubuntu-24.04 | ||
permissions: | ||
checks: write | ||
pull-requests: write | ||
contents: write | ||
issues: write | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
@@ -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: | | ||
|
@@ -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 | ||
|
@@ -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].3 | ||
- name: Commit Changelog [unreleased] with latest version | ||
uses: EndBug/[email protected].4 | ||
if: env.SNAPSHOT == 'false' | ||
with: | ||
author_name: Github Actions | ||
|
@@ -118,7 +133,7 @@ jobs: | |
box forgebox publish --force | ||
- name: Create Github Release | ||
uses: taiki-e/[email protected].0 | ||
uses: taiki-e/[email protected].2 | ||
continue-on-error: true | ||
if: env.SNAPSHOT == 'false' | ||
with: | ||
|
@@ -127,6 +142,18 @@ 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 | ||
########################################################################################## | ||
|
@@ -135,6 +162,11 @@ jobs: | |
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' | ||
runs-on: ubuntu-24.04 | ||
needs: [ build ] | ||
permissions: | ||
checks: write | ||
pull-requests: write | ||
contents: write | ||
issues: write | ||
steps: | ||
# Checkout development | ||
- name: Checkout Repository | ||
|
@@ -165,7 +197,7 @@ jobs: | |
# Commit it back to development | ||
- name: Commit Version Bump | ||
uses: EndBug/[email protected].3 | ||
uses: EndBug/[email protected].4 | ||
with: | ||
author_name: Github Actions | ||
author_email: [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,16 +18,16 @@ jobs: | |
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 ] | ||
# Here we tests all engines against ColdBox@BE | ||
# Experimental: ColdBox BE vs All Engines | ||
include: | ||
- coldboxVersion: "be" | ||
cfengine: "lucee@5" | ||
experimental: true | ||
- coldboxVersion: "be" | ||
cfengine: "adobe@2018" | ||
cfengine: "lucee@6" | ||
experimental: true | ||
- coldboxVersion: "be" | ||
cfengine: "adobe@2021" | ||
|
@@ -36,26 +36,24 @@ jobs: | |
cfengine: "adobe@2023" | ||
experimental: true | ||
- coldboxVersion: "be" | ||
cfengine: "boxlang@1" | ||
cfengine: "boxlang-cfml@1" | ||
experimental: true | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
# 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@v4 | ||
with: | ||
distribution: "temurin" | ||
java-version: "11" | ||
|
||
- 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 cbsecurity;' | ||
# Import Database | ||
mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} < test-harness/tests/resources/cbsecurity.sql | ||
java-version: "21" | ||
|
||
- name: Setup Environment For Testing Process | ||
run: | | ||
|
@@ -73,11 +71,6 @@ jobs: | |
- name: Setup CommandBox CLI | ||
uses: Ortus-Solutions/[email protected] | ||
|
||
- name: Update Commandbox Boxlang Module | ||
if: ${{ matrix.cfengine == 'boxlang@1' }} | ||
run: | ||
box install --force commandbox-boxlang | ||
|
||
- name: Install Dependencies | ||
run: | | ||
box install | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,10 +28,9 @@ | |
"cbcsrf":"^3.0.0" | ||
}, | ||
"devDependencies":{ | ||
"commandbox-boxlang":"*", | ||
"commandbox-cfformat":"*", | ||
"commandbox-docbox":"*", | ||
"commandbox-dotenv":"*", | ||
"commandbox-cfconfig":"*" | ||
"commandbox-docbox":"*" | ||
}, | ||
"ignore":[ | ||
"**/.*", | ||
|
@@ -50,16 +49,10 @@ | |
"format:check":"cfformat check handlers/,interceptors/,models/,test-harness/tests/specs,ModuleConfig.cfc", | ||
"install:dependencies":"install && cd test-harness && install", | ||
"start:lucee":"server start [email protected]", | ||
"start:2018":"server start [email protected]", | ||
"start:2021":"server start [email protected]", | ||
"start:2023":"server start [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]", | ||
"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" | ||
}, | ||
"installPaths":{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"name":"cbsecurity-boxlang@1", | ||
"app":{ | ||
"serverHomeDirectory":".engine/boxlang", | ||
"cfengine":"boxlang@be" | ||
}, | ||
"web":{ | ||
"http":{ | ||
"port":"60299" | ||
}, | ||
"rewrites":{ | ||
"enable":"true" | ||
}, | ||
"webroot": "test-harness", | ||
"aliases":{ | ||
"/moduleroot/cbsecurity":"../" | ||
} | ||
}, | ||
"JVM":{ | ||
"heapSize":"1024", | ||
"javaVersion":"openjdk21_jre", | ||
"args":"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8888" | ||
}, | ||
"openBrowser":"false", | ||
"cfconfig":{ | ||
"file":".cfconfig.json" | ||
}, | ||
"env":{ | ||
}, | ||
"scripts":{ | ||
"onServerInitialInstall":"install bx-compat-cfml,bx-esapi,bx-mysql --noSave" | ||
} | ||
} |
Oops, something went wrong.