-
Notifications
You must be signed in to change notification settings - Fork 19
98 lines (83 loc) · 2.62 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
name: Pull Requests
on:
push:
branches-ignore:
- "main"
- "master"
- "development"
pull_request:
branches:
- development
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@2018", "adobe@2021" ]
steps:
- name: Checkout Repository
uses: actions/[email protected]
- name: Setup Java
uses: actions/[email protected]
with:
distribution: "adopt"
java-version: "11"
- name: Setup CommandBox
uses: elpete/[email protected]
- name: Install Test Harness Dependencies
working-directory: ./test-harness
run: |
box install
- name: Start ${{ matrix.cfengine }} Server
working-directory: ./test-harness
run: |
echo "matrix.cfengine=${{ matrix.cfengine }}" > ./.env
box server start serverConfigFile="server-${{ matrix.cfengine }}.json" --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: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 PR Test Reports
uses: mikepenz/action-junit-report@v2
with:
report_paths: 'test-harness/tests/results/**/*.xml'
check_name: "${{ matrix.cfengine }} Test Results"
summary: true
- name: Failure Debugging Info
if: ${{ failure() }}
working-directory: ./test-harness
run: |
box server log serverConfigFile="server-${{ matrix.cfengine }}.json"
format:
name: Format
runs-on: ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/[email protected]
- name: Setup Java
uses: actions/[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
- name: Commit Format Changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Apply cfformat changes