-
-
Notifications
You must be signed in to change notification settings - Fork 5
109 lines (94 loc) · 3.22 KB
/
pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: Pull Requests
on:
pull_request:
branches:
- development
- master
jobs:
#############################################
# Tests First baby! We fail, no build :(
#############################################
tests:
name: Tests
runs-on: ubuntu-20.04
env:
MODULE_ID: cbwire
strategy:
fail-fast: false
matrix:
cfengine: [ "lucee@5", "adobe@2018" ]
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
# ENV
#printf "DB_HOST=localhost\n" >> test-harness/.env
#printf "DB_USER=${{ env.DB_USER }}\n" >> test-harness/.env
#printf "DB_PASSWORD=${{ env.DB_PASSWORD }}\n" >> test-harness/.env
#printf "DB_CLASS=com.mysql.cj.jdbc.Driver\n" >> test-harness/.env
#printf "DB_BUNDLEVERSION=8.0.19\n" >> test-harness/.env
#printf "DB_BUNDLENAME=com.mysql.cj\n" >> test-harness/.env
- name: Setup CommandBox
uses: elpete/[email protected]
- name: Install Main Dependencies
working-directory: ./
run: |
box install
- name: Install Harness 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: 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/*
format:
name: Format
runs-on: ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
- uses: Ortus-Solutions/commandbox-action@v1
with:
cmd: run-script format
- name: Commit Format Changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Apply cfformat changes