Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
lmajano committed Feb 17, 2022
2 parents cfb78cf + 41f769c commit daa4a24
Show file tree
Hide file tree
Showing 27 changed files with 305 additions and 487 deletions.
95 changes: 7 additions & 88 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Pull Requests
name: Coldbox Pull Requests

on:
push:
Expand All @@ -12,79 +12,9 @@ on:

jobs:
tests:
name: Tests
runs-on: ubuntu-20.04
env:
DB_USER: root
DB_PASSWORD: root
strategy:
fail-fast: true
matrix:
cfengine: [ "lucee@5", "adobe@2016", "adobe@2018", "adobe@2021" ]
javaVersion: [ "openjdk8", "openjdk11" ]
fullNull: [ "true", "false" ]
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Setup Database and Fixtures
run: |
sudo systemctl start mysql.service
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
uses: elpete/[email protected]

- name: Setup .env For Runner
run: |
touch .env
printf "DB_HOST=127.0.0.1\n" >> .env
printf "DB_DATABASE=coolblog\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: Install Dependencies
run: |
box install
- name: Start ${{ matrix.cfengine }}/${{ matrix.javaVersion }} Server
run: |
box server start serverConfigFile="server-${{ matrix.cfengine }}.json" javaVersion=${{ matrix.javaVersion }} --noSaveSettings --debug
# Install Adobe 2021 cfpm modules
if [[ "${{ matrix.cfengine }}" == "adobe@2021" ]] ; then
box run-script install:2021
fi
# Test the harness
curl http://127.0.0.1:8599/test-harness
- name: Run Tests
env:
FULL_NULL: ${{ matrix.fullNull }}
run: |
ant -f build/build.xml run-tests
- name: Publish PR Test Reports
uses: mikepenz/action-junit-report@v2
with:
report_paths: 'tests/results/**/*.xml'
check_name: "${{ matrix.cfengine }}/${{ matrix.javaVersion }} Test Results"
summary: true

- name: Failure debugging
if: ${{ failure() }}
run: |
box server log serverConfigFile="server-${{ matrix.cfengine }}.json"
uses: ColdBox/coldbox-platform/.github/workflows/tests.yml@development
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

format:
name: Format
Expand All @@ -93,22 +23,11 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Setup Java
uses: actions/setup-java@v2
- uses: Ortus-Solutions/[email protected]
with:
distribution: "adopt"
java-version: "11"

- name: Set Up CommandBox
uses: elpete/[email protected]

- name: Install CFFormat
run: box install commandbox-cfformat

- name: Run CFFormat
run: box run-script format
cmd: run-script format

- name: Commit Format Changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Apply cfformat changes
commit_message: Apply cfformat changes
26 changes: 22 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
name: ColdBox Platform CI
# This workflow is used to release master releases and also by the snapshot workflow
# to release snapshots.
name: ColdBox Release

# Only on Development we build snapshots
on:
push:
branches:
- master
workflow_call:
secrets:
SLACK_WEBHOOK_URL:
required: true
FORGEBOX_API_TOKEN:
required: true
AWS_ACCESS_KEY:
required: true
AWS_ACCESS_SECRET:
required: true

env:
COLDBOX_PRERELEASE: false

jobs:

#############################################
# Build Snapshot or Final Release
#############################################
build:
name: Build & Publish Release
runs-on: ubuntu-20.04
Expand All @@ -36,7 +49,7 @@ jobs:
${{ runner.OS }}-commandbox-cache-${{ hashFiles( 'box.json' ) }}
- name: Setup CommandBox
uses: elpete/setup-commandbox@v1.0.0
uses: Ortus-Solutions/setup-commandbox@main
with:
forgeboxAPIKey: ${{ secrets.FORGEBOX_API_TOKEN }}

Expand All @@ -45,7 +58,12 @@ jobs:
run: |
echo "COLDBOX_VERSION=`cat box.json | jq '.version' -r`" >> $GITHUB_ENV
box package set [email protected]@[email protected]@
# master or snapshot
echo "BRANCH=master" >> $GITHUB_ENV
if [ $GITHUB_REF == 'refs/heads/development' ]
then
echo "BRANCH=development" >> $GITHUB_ENV
fi
- name: Install Dependencies
run: |
Expand Down
Loading

0 comments on commit daa4a24

Please sign in to comment.