-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: New module template and calls endpoint
- Loading branch information
Showing
196 changed files
with
2,082 additions
and
34,073 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,37 @@ | ||
name: CFFormat | ||
|
||
on: | ||
workflow_dispatch: | ||
repository_dispatch: | ||
types: [cfformat] | ||
push: | ||
branches-ignore: | ||
- "main" | ||
- "development" | ||
paths: # Only run if *.cfc or github workflows are modified | ||
- '**.cfc' | ||
- '.github/workflows/*.yml' | ||
pull_request: | ||
branches: | ||
- development | ||
paths: # Only run if *.cfc or github workflows are modified | ||
- '**.cfc' | ||
- '.github/workflows/*.yml' | ||
|
||
jobs: | ||
# Format PR | ||
format: | ||
name: Format | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- uses: Ortus-Solutions/[email protected] | ||
with: | ||
cmd: run-script format | ||
|
||
- name: Commit Format Changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Apply cfformat changes |
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,36 @@ | ||
name: Generate API Docs | ||
|
||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
repository_dispatch: | ||
types: [docbox] | ||
|
||
jobs: | ||
docbox: | ||
name: Generate API Docs | ||
runs-on: ubuntu-latest | ||
container: ghcr.io/foundeo/cfml-ci-tools/cfml-ci-tools:1.0.6 | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Generate API Docs | ||
run: box run-script build:docs | ||
|
||
- name: Setup env.VERSION | ||
run: | | ||
echo "VERSION=`box package version`" >> $GITHUB_ENV | ||
echo ${{ env.VERSION }} | ||
- name: Upload API Docs to S3 | ||
uses: jakejarvis/s3-sync-action@master | ||
with: | ||
args: --acl public-read | ||
env: | ||
AWS_S3_BUCKET: "apidocs.ortussolutions.com" | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_SECRET }} | ||
SOURCE_DIR: ".tmp/apidocs" | ||
DEST_DIR: "${{ github.repository }}/${{ env.VERSION }}" |
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,20 @@ | ||
name: Pull Requests | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- "main" | ||
- "development" | ||
pull_request: | ||
branches: | ||
- development | ||
|
||
jobs: | ||
tests: | ||
uses: ./.github/workflows/tests.yml | ||
secrets: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
TWILIO_ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }} | ||
TWILIO_AUTHTOKEN: ${{ secrets.TWILIO_AUTHTOKEN }} | ||
TWILIO_TEST_ACCOUNT_SID: ${{ secrets.TWILIO_TEST_ACCOUNT_SID }} | ||
TWILIO_TEST_AUTHTOKEN: ${{ secrets.TWILIO_TEST_AUTHTOKEN }} |
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,112 @@ | ||
name: twilio-sdk CI | ||
|
||
# Only on Development we build snapshots | ||
on: | ||
push: | ||
branches: | ||
- development | ||
- main | ||
|
||
env: | ||
MODULE_ID: twilio-sdk | ||
|
||
jobs: | ||
############################################# | ||
# Tests First baby! We fail, no build :( | ||
############################################# | ||
tests: | ||
uses: ./.github/workflows/tests.yml | ||
secrets: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
TWILIO_ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }} | ||
TWILIO_AUTHTOKEN: ${{ secrets.TWILIO_AUTHTOKEN }} | ||
TWILIO_TEST_ACCOUNT_SID: ${{ secrets.TWILIO_TEST_ACCOUNT_SID }} | ||
TWILIO_TEST_AUTHTOKEN: ${{ secrets.TWILIO_TEST_AUTHTOKEN }} | ||
|
||
############################################# | ||
# Build ContentBox | ||
############################################# | ||
build: | ||
name: Build & Publish | ||
needs: tests | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v2 | ||
with: | ||
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' ) }}-${{ hashFiles( 'test-harness/box.json' ) }} | ||
restore-keys: | | ||
${{ runner.OS }}-commandbox-cache-${{ hashFiles( 'box.json' ) }}-${{ hashFiles( 'test-harness/box.json' ) }} | ||
- name: Setup CommandBox | ||
uses: Ortus-Solutions/setup-commandbox@main | ||
with: | ||
forgeboxAPIKey: ${{ secrets.FORGEBOX_TOKEN }} | ||
|
||
- name: Setup Environment Variables For Build Process | ||
id: current_version | ||
run: | | ||
echo "VERSION=`cat box.json | jq '.version' -r`" >> $GITHUB_ENV | ||
box package set [email protected]@[email protected]@ | ||
# main or snapshot | ||
echo "Github Ref is $GITHUB_REF" | ||
echo "BRANCH=main" >> $GITHUB_ENV | ||
if [ $GITHUB_REF == 'refs/heads/development' ] | ||
then | ||
echo "BRANCH=development" >> $GITHUB_ENV | ||
fi | ||
- name: Install and Configure Semantic Release | ||
run: | | ||
box install commandbox-semantic-release | ||
box config set endpoints.forgebox.APIToken=${{ secrets.FORGEBOX_TOKEN }} | ||
box config set modules.commandbox-semantic-release.targetBranch=main | ||
box config set modules.commandbox-semantic-release.plugins='{ "VerifyConditions": "GitHubActionsConditionsVerifier@commandbox-semantic-release", "FetchLastRelease": "ForgeBoxReleaseFetcher@commandbox-semantic-release", "RetrieveCommits": "JGitCommitsRetriever@commandbox-semantic-release", "ParseCommit": "ConventionalChangelogParser@commandbox-semantic-release", "FilterCommits": "DefaultCommitFilterer@commandbox-semantic-release", "AnalyzeCommits": "DefaultCommitAnalyzer@commandbox-semantic-release", "VerifyRelease": "NullReleaseVerifier@commandbox-semantic-release", "GenerateNotes": "GitHubMarkdownNotesGenerator@commandbox-semantic-release", "UpdateChangelog": "FileAppendChangelogUpdater@commandbox-semantic-release", "CommitArtifacts": "NullArtifactsCommitter@commandbox-semantic-release", "PublishRelease": "ForgeBoxReleasePublisher@commandbox-semantic-release", "PublicizeRelease": "GitHubReleasePublicizer@commandbox-semantic-release" }' | ||
- name: Run Semantic Release | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: box semantic-release | ||
|
||
# - name: Upload Build Artifacts | ||
# if: success() | ||
# uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: twilio-sdk | ||
# path: | | ||
# .artifacts/**/* | ||
|
||
# - name: Upload Binaries to S3 | ||
# uses: jakejarvis/s3-sync-action@master | ||
# with: | ||
# args: --acl public-read | ||
# env: | ||
# AWS_S3_BUCKET: "downloads.ortussolutions.com" | ||
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }} | ||
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_SECRET }} | ||
# SOURCE_DIR: ".artifacts/${{ env.MODULE_ID }}" | ||
# DEST_DIR: "ortussolutions/coldbox-modules/${{ env.MODULE_ID }}" | ||
|
||
- name: Inform Slack of Build | ||
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: '${{ env.MODULE_ID }} Built with ${{ job.status }}!' | ||
SLACK_TITLE: "${{ env.MODULE_ID }} Build" | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
name: Test Suites | ||
|
||
# We are a reusable Workflow only | ||
on: | ||
workflow_call: | ||
secrets: | ||
SLACK_WEBHOOK_URL: | ||
required: true | ||
TWILIO_ACCOUNT_SID: | ||
required: true | ||
TWILIO_AUTHTOKEN: | ||
required: true | ||
TWILIO_TEST_ACCOUNT_SID: | ||
required: true | ||
TWILIO_TEST_AUTHTOKEN: | ||
required: true | ||
|
||
jobs: | ||
tests: | ||
name: Tests | ||
runs-on: ubuntu-20.04 | ||
env: | ||
DB_USER: root | ||
DB_PASSWORD: root | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
cfengine: [ "lucee@5", "adobe@2018", "adobe@2021" ] | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
# 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 }} < tests/resources/coolblog.sql | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: "adopt" | ||
java-version: "11" | ||
|
||
- name: Setup CommandBox CLI | ||
uses: Ortus-Solutions/setup-commandbox@main | ||
|
||
# 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: Cache CommandBox Dependencies | ||
uses: actions/cache@v1 | ||
if: ${{ true }} | ||
with: | ||
path: ~/.CommandBox/artifacts | ||
key: ${{ runner.OS }}-commandbox-cache-${{ hashFiles( 'box.json' ) }}-${{ hashFiles( 'box.json' ) }} | ||
restore-keys: | | ||
${{ runner.OS }}-commandbox-cache-${{ hashFiles( 'box.json' ) }}-${{ hashFiles( 'box.json' ) }} | ||
- name: Install Test Harness Dependencies | ||
run: | | ||
box install | ||
- name: Start ${{ matrix.cfengine }} Server | ||
env: | ||
TWILIO_ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }} | ||
TWILIO_AUTHTOKEN: ${{ secrets.TWILIO_AUTHTOKEN }} | ||
TWILIO_TEST_ACCOUNT_SID: ${{ secrets.TWILIO_TEST_ACCOUNT_SID }} | ||
TWILIO_TEST_AUTHTOKEN: ${{ secrets.TWILIO_TEST_AUTHTOKEN }} | ||
run: | | ||
box server start cfengine=${{ matrix.cfengine }} port=49619 --noSaveSettings --debug | ||
# Install Adobe 2021 cfpm modules | ||
if [[ "${{ matrix.cfengine }}" == "adobe@2021" ]] ; then | ||
box run-script install:2021 | ||
fi | ||
curl http://127.0.0.1:49619 | ||
- name: Run Tests | ||
env: | ||
TWILIO_ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }} | ||
TWILIO_AUTHTOKEN: ${{ secrets.TWILIO_AUTHTOKEN }} | ||
TWILIO_TEST_ACCOUNT_SID: ${{ secrets.TWILIO_TEST_ACCOUNT_SID }} | ||
TWILIO_TEST_AUTHTOKEN: ${{ secrets.TWILIO_TEST_AUTHTOKEN }} | ||
run: | | ||
mkdir -p tests/results | ||
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: tests/results/**/*.xml | ||
check_name: "${{ matrix.cfengine }} Test Results" | ||
|
||
- name: Upload Test Results to Artifacts | ||
if: always() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: test-results-${{ matrix.cfengine }} | ||
path: | | ||
tests/results/**/* | ||
- name: Show Server Log On Failures | ||
if: ${{ failure() }} | ||
run: | | ||
box server log | ||
- name: Upload Debug Logs To Artifacts | ||
if: ${{ failure() }} | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: Failure Debugging Info - ${{ matrix.cfengine }} | ||
path: | | ||
.engine/**/logs/* | ||
.engine/**/WEB-INF/cfusion/logs/* | ||
- name: Slack Notifications | ||
# Only on failures and NOT in pull requests | ||
if: ${{ failure() && !startsWith( 'pull_request', github.event_name ) }} | ||
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: '${{ github.repository }} tests failed :cry:' | ||
SLACK_TITLE: ${{ github.repository }} Tests For ${{ matrix.cfengine }} failed | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,6 @@ | ||
# IDE Stuff | ||
.settings | ||
settings.xml | ||
|
||
# Logs | ||
logs/*.log | ||
|
||
# Test Results | ||
tests/results/* | ||
|
||
# Secrets | ||
.env | ||
|
||
# Dependenncies | ||
coldbox/* | ||
testbox/* | ||
docbox/* | ||
artifacts/* | ||
apidocs/twilio-sdk-apidocs/* | ||
workbench/* | ||
build/* | ||
modules/twilio-sdk/modules/hyper | ||
/testbox | ||
/tests/results | ||
/tests/resources/app/coldbox | ||
/node_modules | ||
/modules | ||
.env |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.