-
-
Notifications
You must be signed in to change notification settings - Fork 9
96 lines (81 loc) · 2.59 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
name: Pull Requests
on:
push:
branches-ignore:
- "main"
- "master"
- "development"
pull_request:
branches:
- development
jobs:
tests:
name: Tests
runs-on: ubuntu-20.04
env:
ELASTICSEARCH_PROTOCOL: http
ELASTICSEARCH_HOST: 127.0.0.1
ELASTICSEARCH_PORT: 9200
ELASTICSEARCH_VERSION: 7.8.0
strategy:
fail-fast: true
matrix:
cfengine: ["lucee@5", "adobe@2016", "adobe@2018"]
javaVersion: [ "8", "11" ]
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: "adopt"
java-version: ${{ matrix.javaVersion }}
- name: Setup CommandBox
uses: elpete/setup-commandbox@v1.0.0
- name: Setup Elasticsearch
run: |
docker run -d -p "${{ env.ELASTICSEARCH_PORT }}:9200" -e 'discovery.type=single-node' elasticsearch:${{ env.ELASTICSEARCH_VERSION }}
rm -rf modules_app
rm -f tests/specs/unit/SecondaryClientTest.cfc
- name: Install Dependencies
run: |
box install
box install commandbox-cfconfig,commandbox-dotenv,commandbox-docbox
- name: Start ${{ matrix.cfengine }} Server
run: |
box server start serverConfigFile="server-${{ matrix.cfengine }}.json" --debug
curl http://127.0.0.1:60299
- name: Run Web App Tests
run: |
mkdir -p tests/results
box testbox run --verbose outputFile=tests/results/web outputFormats=json,antjunit
- 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"
format:
name: Format
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/setup-commandbox@v1.0.0
- 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