Skip to content

Commit

Permalink
updated to latest updates
Browse files Browse the repository at this point in the history
  • Loading branch information
lmajano committed Apr 4, 2023
1 parent aa17842 commit cb02d29
Show file tree
Hide file tree
Showing 15 changed files with 345 additions and 287 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.YML
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
patreon: ortussolutions
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Bug report
about: Create a report to help us improve
---

<!-- Thanks for reporting an issue! Please fill out the blanks below. -->

## What are the steps to reproduce this issue?

1.
2.
3.

## What happens?


## What were you expecting to happen?


## Any logs, error output, etc?


## Any other comments?


## What versions are you using?

**Operating System:**
**Package Version:**
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Feature Request
about: Request a new feature or enhancement
---

<!-- Thanks for taking the time to recommend a feature! Please fill out the form below -->

## Summary

<!-- High level description of what this feature is -->

## Detailed Description

<!-- Lets get into the weeds here -->

## Possible Implementation Ideas

<!-- If you already have some idea of how to implement this, this would be the place to put it -->
29 changes: 29 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Description

Please include a summary of the changes and which issue(s) is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

**Please note that all PRs must have tests attached to them**

IMPORTANT: Please review the [CONTRIBUTING.md](../CONTRIBUTING.md) file for detailed contributing guidelines.

## Issues

All PRs must have an accompanied issue. Please make sure you created it and linked it here.

## Type of change

Please delete options that are not relevant.

- [ ] Bug Fix
- [ ] Improvement
- [ ] New Feature
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

## Checklist

- [ ] My code follows the style guidelines of this project [cfformat](../.cfformat.json)
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
32 changes: 15 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: @module_name@ CI
name: @MODULE_NAME@ CI

# Only on Development we build snapshots
on:
push:
branches:
Expand All @@ -11,6 +10,14 @@ env:
MODULE_ID: @MODULE_SLUG@

jobs:
#############################################
# Tests First baby! We fail, no build :(
#############################################
tests:
uses: ./.github/workflows/tests.yml
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

#############################################
# Build Module
#############################################
Expand All @@ -19,25 +26,16 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v3.2.0

- name: Setup Java
uses: actions/setup-java@v2
uses: actions/setup-java@v3.9.0
with:
distribution: "adopt"
distribution: "temurin"
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: elpete/setup-commandbox@v2.0.1
with:
forgeboxAPIKey: ${{ secrets.FORGEBOX_API_TOKEN }}

Expand Down Expand Up @@ -74,7 +72,7 @@ jobs:

- name: Upload Build Artifacts
if: success()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3.1.1
with:
name: Module Artifacts
path: |
Expand Down Expand Up @@ -118,4 +116,4 @@ jobs:
SLACK_MESSAGE: '${{ env.MODULE_ID }} Built with ${{ job.status }}!'
SLACK_TITLE: "${{ env.MODULE_ID }} Build"
SLACK_USERNAME: CI
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
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/[email protected]
- uses: taiki-e/[email protected]
with:
# Produced by the build/Build.cfc
changelog: changelog.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60 changes: 8 additions & 52 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,67 +6,23 @@ on:
- "main"
- "master"
- "development"
- "v*"
pull_request:
branches:
- "v*"
- development

jobs:
tests:
name: Tests
runs-on: ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2

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

- name: Setup CommandBox
uses: elpete/[email protected]

- name: Install Dependencies
run: |
box install
uses: ./.github/workflows/tests.yml

- name: Run Tests
run: |
# Create the CommandBox modules folder, for some reason it is not created
mkdir -p ~/.CommandBox/cfml/modules
# Link up the module so we can do testing!
box link --force
# Test
box task run taskfile=build/Build target="runTests"
- name: Failure Logs
if: failure()
run: cat `box system-log`

format:
name: Format
formatCheck:
name: Checks Source Code Formatting
runs-on: ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Setup Java
uses: actions/setup-java@v2
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
uses: actions/[email protected]

- name: Commit Format Changes
uses: stefanzweifel/git-auto-commit-action@v4
- uses: Ortus-Solutions/[email protected]
with:
commit_message: Apply cfformat changes
cmd: run-script format:check
58 changes: 58 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Test Suites

# We are a reusable Workflow only
on:
workflow_call:
secrets:
SLACK_WEBHOOK_URL:
required: true

jobs:
tests:
name: Tests
runs-on: ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/[email protected]

- name: Setup Java
uses: actions/[email protected]
with:
distribution: "temurin"
java-version: "11"

- name: Setup CommandBox CLI
uses: Ortus-Solutions/[email protected]

# 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: Install Test Harness Dependencies
run: |
box install
- name: Run Tests
run: |
# Create the CommandBox modules folder, for some reason it is not created
mkdir -p ~/.CommandBox/cfml/modules
# Link up the module so we can do testing!
box link --force
# Test
box task run taskfile=build/Build target="runTests"
- name: Failure Logs
if: failure()
run: cat `box system-log`
Loading

0 comments on commit cb02d29

Please sign in to comment.