Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/ci.yml
#	.github/workflows/pr.yml
  • Loading branch information
lmajano committed Oct 19, 2022
2 parents 2ab7b30 + a6c425a commit 2587c8a
Show file tree
Hide file tree
Showing 34 changed files with 1,422 additions and 915 deletions.
18 changes: 18 additions & 0 deletions .cfconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"adminPassword" : "coldbox",
"componentCacheEnabled":false,
"postParametersLimit" : 200,
"robustExceptionEnabled":true,
"saveClassFiles":false,
"systemErr":"System",
"systemOut":"System",
"thistimezone":"UTC",
"whitespaceManagement":"white-space-pref",
"debuggingEnabled":true,
"debuggingReportExecutionTimes":false,
"disableInternalCFJavaComponents":false,
"inspectTemplate":"always",
"requestTimeout":"0,0,0,90",
"datasources":{
}
}
29 changes: 15 additions & 14 deletions .cfformat.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"array.empty_padding": false,
"array.padding": true,
"array.multiline.min_length": 40,
"array.multiline.min_length": 50,
"array.multiline.element_count": 2,
"array.multiline.leading_comma.padding": true,
"array.multiline.leading_comma": false,
"alignment.consecutive.assignments": true,
"alignment.consecutive.properties": true,
"alignment.consecutive.params": true,
"alignment.doc_comments" : true,
"brackets.padding": true,
"comment.asterisks": "align",
"binary_operators.padding": true,
Expand All @@ -17,22 +18,22 @@
"function_call.multiline.leading_comma.padding": true,
"function_call.casing.builtin": "cfdocs",
"function_call.casing.userdefined": "camel",
"function_call.multiline.element_count": 2,
"function_call.multiline.element_count": 3,
"function_call.multiline.leading_comma": false,
"function_call.multiline.min_length": 40,
"function_call.multiline.min_length": 50,
"function_declaration.padding": true,
"function_declaration.empty_padding": false,
"function_declaration.multiline.leading_comma": false,
"function_declaration.multiline.leading_comma.padding": true,
"function_declaration.multiline.element_count": 2,
"function_declaration.multiline.min_length": 40,
"function_declaration.multiline.element_count": 3,
"function_declaration.multiline.min_length": 50,
"function_declaration.group_to_block_spacing": "compact",
"function_anonymous.empty_padding": false,
"function_anonymous.group_to_block_spacing": "compact",
"function_anonymous.multiline.element_count": 2,
"function_anonymous.multiline.element_count": 3,
"function_anonymous.multiline.leading_comma": false,
"function_anonymous.multiline.leading_comma.padding": true,
"function_anonymous.multiline.min_length": 40,
"function_anonymous.multiline.min_length": 50,
"function_anonymous.padding": true,
"indent_size": 4,
"keywords.block_to_keyword_spacing": "spaced",
Expand All @@ -41,13 +42,13 @@
"keywords.spacing_to_block": "spaced",
"keywords.spacing_to_group": true,
"keywords.empty_group_spacing": false,
"max_columns": 120,
"max_columns": 115,
"metadata.multiline.element_count": 3,
"metadata.multiline.min_length": 40,
"method_call.chain.multiline": 3,
"newline": "\n",
"metadata.multiline.min_length": 50,
"method_call.chain.multiline" : 3,
"newline":"\n",
"property.multiline.element_count": 3,
"property.multiline.min_length": 40,
"property.multiline.min_length": 30,
"parentheses.padding": true,
"strings.quote": "double",
"strings.attributes.quote": "double",
Expand All @@ -57,6 +58,6 @@
"struct.multiline.leading_comma": false,
"struct.multiline.leading_comma.padding": true,
"struct.multiline.element_count": 2,
"struct.multiline.min_length": 40,
"struct.multiline.min_length": 60,
"tab_indent": true
}
}
2 changes: 1 addition & 1 deletion .cflintrc
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@
"parameters": {
"TooManyFunctionsChecker.maximum" : 20
}
}
}
1 change: 1 addition & 0 deletions test-harness/.env.example → .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ AWS_ACCESS_KEY=
AWS_ACCESS_SECRET=
AWS_REGION=us-east-1
AWS_DOMAIN=amazonaws.com
AWS_DEFAULT_BUCKET_NAME=
# This env var will be used in a bucket name for the test suite. It's not
# required for local development. In CI, the ENGINE var will be defined by
# the CI setup, so that we can test on several engines simultaneously without
Expand Down
1 change: 1 addition & 0 deletions .github/FUNDING.YML
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
patreon: ortussolutions
124 changes: 10 additions & 114 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,110 +14,14 @@ jobs:
# Tests First baby! We fail, no build :(
#############################################
tests:
name: Tests
runs-on: ubuntu-20.04
env:
AWS_DOMAIN: amazonaws.com
AWS_REGION: us-east-1
strategy:
fail-fast: false
matrix:
cfengine: [ "lucee@5", "adobe@2018", "adobe@2021" ]
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: "adopt"
java-version: "11"

- name: Setup Environment For Testing Process
working-directory: ./test-harness
run: |
# Setup .env
touch .env
printf "AWS_ACCESS_KEY=${{ secrets.S3SDK_AWS_ACCESS_KEY }}\n" >> .env
printf "AWS_ACCESS_SECRET=${{ secrets.S3SDK_AWS_ACCESS_SECRET }}\n" >> .env
printf "AWS_REGION=${{ env.AWS_REGION }}\n" >> .env
printf "AWS_DOMAIN=${{ env.AWS_DOMAIN }}\n" >> .env
printf "ENGINE=${{ matrix.cfengine }}\n" >> .env
- name: Cache CommandBox Dependencies
uses: actions/cache@v1
if: ${{ true }}
with:
path: ~/.CommandBox/artifacts
key: ${{ runner.OS }}-commandbox-cache-${{ hashFiles( 'box.json' ) }}-${{ hashFiles( 'test-harness/box.json' ) }}
restore-keys: |
${{ runner.OS }}-commandbox-cache-${{ hashFiles( 'box.json' ) }}-${{ hashFiles( 'test-harness/box.json' ) }}
- name: Setup CommandBox
uses: elpete/[email protected]

- name: Install Dependencies
working-directory: ./test-harness
run: |
box install
- name: Start ${{ matrix.cfengine }} Server
working-directory: ./test-harness
run: |
box server start serverConfigFile="server-${{ matrix.cfengine }}.json" --noSaveSettings --debug
curl http://127.0.0.1:60299
- name: Run Tests
working-directory: ./test-harness
run: |
mkdir tests/results
box package set testbox.runner="http://localhost:60299/tests/runner.cfm"
box testbox run --verbose outputFile=tests/results/test-results outputFormats=json,antjunit
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
if: always()
with:
files: test-harness/tests/results/**/*.xml
check_name: "${{ matrix.cfengine }} Test Results"

- name: Upload Test Results Artifacts
if: always()
uses: actions/upload-artifact@v2
with:
name: contentbox-test-results-${{ matrix.cfengine }}
path: |
test-harness/tests/results/**/*
- name: Slack Notification
if: failure()
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: '${{ env.MODULE_ID }} tests failed :cry:'
SLACK_TITLE: ${{ env.MODULE_ID }} Tests For ${{ matrix.cfengine }} failed
SLACK_USERNAME: CI
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}

- name: Failure Debugging Info
if: ${{ failure() }}
working-directory: ./test-harness
run: |
box server log serverConfigFile="server-${{ matrix.cfengine }}.json"
- name: Upload Debugging Info To Artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: Failure Debugging Info - ${{ matrix.cfengine }}
path: |
test-harness/.engine/**/logs/*
test-harness/.engine/**/WEB-INF/cfusion/logs/*
uses: ./.github/workflows/tests.yml
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
S3SDK_AWS_ACCESS_KEY: ${{ secrets.S3SDK_AWS_ACCESS_KEY }}
S3SDK_AWS_ACCESS_SECRET: ${{ secrets.S3SDK_AWS_ACCESS_SECRET }}

#############################################
# Build ContentBox
# Build Module
#############################################
build:
name: Build & Publish
Expand All @@ -135,17 +39,8 @@ jobs:
distribution: "adopt"
java-version: "11"

- name: Cache CommandBox Dependencies
uses: actions/cache@v1
if: ${{ true }}
with:
path: ~/.CommandBox/artifacts
key: ${{ runner.OS }}-commandbox-cache-${{ hashFiles( 'box.json' ) }}
restore-keys: |
${{ runner.OS }}-commandbox-cache-${{ hashFiles( 'box.json' ) }}
- name: Setup CommandBox
uses: elpete/setup-commandbox@v1.0.0
uses: Ortus-Solutions/setup-commandbox@v2.0.1
with:
forgeboxAPIKey: ${{ secrets.FORGEBOX_TOKEN }}

Expand All @@ -161,7 +56,8 @@ jobs:
then
echo "BRANCH=development" >> $GITHUB_ENV
fi
- name: Build ${{ env.MODULE_ID }} for ${{ env.BRANCH }} v${{ env.VERSION }}
- name: Build ${{ env.MODULE_ID }}
run: |
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 }}
Expand All @@ -170,7 +66,7 @@ jobs:
if: success()
uses: actions/upload-artifact@v2
with:
name: s3sdk
name: ${{ env.MODULE_ID }}
path: |
.artifacts/**/*
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/gh-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Publish Github Release
name: Github Release

on:
push:
tags:
- v[0-9]+.*

jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: taiki-e/[email protected]
with:
# Produced by the build/Build.cfc
changelog: changelog.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit 2587c8a

Please sign in to comment.