https://github.com/michaelborn/cf-server-action
Start a CommandBox server for use in GitHub Actions workflows
https://github.com/michaelborn/cf-server-action
Last synced: about 1 year ago
JSON representation
Start a CommandBox server for use in GitHub Actions workflows
- Host: GitHub
- URL: https://github.com/michaelborn/cf-server-action
- Owner: michaelborn
- License: mit
- Created: 2022-01-31T11:49:28.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-04T13:32:57.000Z (over 4 years ago)
- Last Synced: 2025-01-13T10:28:08.440Z (over 1 year ago)
- Language: Shell
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CF Server Github Action
Start a CommandBox server in a background process for automated testing with GitHub Actions.
[](https://github.com/marketplace/actions/cf-server-action)
## Usage
### Basic Usage
This example will start up a Lucee5-based CFML server listening on port 2022:
```yml
steps:
- uses: michaelborn/cf-server-action@v1
with:
imageTag: lucee5
serverPort: 2022
```
### Using a CF Server Matrix
Pass `${{ matrix.cfengine }}` to the `imageTag` option to run your tests against a defined "matrix" of CF engines:
```yml
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
cfengine: ["lucee5", "adobe2016", "adobe2018" ]
steps:
- name: Start server
uses: michaelborn/cf-server-action@v1
with:
imageTag: ${{ matrix.cfengine }}
serverPort: 1221
```
### Environment Variable Support
You can configure some CommandBox and CFConfig properties using environment variables:
```yml
steps:
- uses: michaelborn/cf-server-action@v1
with:
imageTag: adobe2018
serverPort: 9999
env:
BOX_CONFIG_VERBOSEERRORS: true
BOX_CONFIG_NONINTERACTIVESHELL: true
# Override server start settings
BOX_SERVER_PROFILE: development
BOX_SERVER_JVM_HEAPSIZE: 1024
# Override CF engine settings with CFConfig
CFCONFIG_ADMINPASSWORD: pass
CFCONFIG_REQUESTTIMEOUT: 0,0,5,0
CFCONFIG_LOGGERS_DEPLOY_LEVEL: trace
# Install extensions in Lucee (which can include the CLI)
LUCEE_EXTENSIONS:
```
For more info, read:
* [CommandBox Docker Image Environment Variables](https://commandbox.ortusbooks.com/deploying-commandbox/docker#environment-variables)
* [CFConfig Environment Variables](https://cfconfig.ortusbooks.com/using-the-cli/env-var-overrides)
## Arguments
* `imageTag` - The CommandBox server to use. For example, `lucee@5.3.8`. See [all supported tags](https://hub.docker.com/r/ortussolutions/commandbox/tags?)
* `serverPort` - Port for the CommandBox container to listen on. This is NOT the same as the server.json port.
# License
The scripts and documentation in this project are released under the [MIT License](LICENSE)
## Code of Conduct
> :book: Do unto others as you would have them do to you - [Matthew 7:12](https://www.biblegateway.com/passage/?search=matthew+7%3A12&version=NIV)