-
-
Notifications
You must be signed in to change notification settings - Fork 73
104 lines (92 loc) · 3.35 KB
/
tests.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
name: TestBox Test Suites
# We are a reusable Workflow only
on:
workflow_call:
secrets:
SLACK_WEBHOOK_URL:
required: false
jobs:
tests:
name: Test Suites
runs-on: ubuntu-20.04
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
commandbox_version: [ "6.1.0-rc" ]
cfengine: [ "lucee@5", "lucee@6", "adobe@2021", "adobe@2023" ]
jdkVersion: [ "11" ]
experimental: [false]
include:
- cfengine: "boxlang@1"
commandbox_version: "6.1.0-rc"
jdkVersion: "21"
experimental: false
- cfengine: "lucee@6"
commandbox_version: "6.1.0-rc"
jdkVersion: "17"
experimental: true
- cfengine: "adobe@2023"
commandbox_version: "6.1.0-rc"
jdkVersion: "17"
experimental: true
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: ${{ matrix.jdkVersion }}
- name: Setup CommandBox
uses: Ortus-Solutions/[email protected]
with:
version: ${{ matrix.commandbox_version }}
install: testbox-cli
- name: Install Dependencies
run: |
box install commandbox-boxlang
box install --production
- name: Start ${{ matrix.cfengine }}/${{ matrix.jdkVersion }} Server
run: |
box server start serverConfigFile="server-${{ matrix.cfengine }}.json" --noSaveSettings --debug
- name: Run Tests
run: |
box task run taskfile=build/Build target=runTests
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
junit_files: tests/results/**/*.xml
check_name: "${{ matrix.cfengine }} ${{ matrix.jdkVersion }} Test Results"
- name: Upload Test Results Artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: testbox-test-results-${{ matrix.cfengine }}-${{ matrix.jdkVersion }}
path: |
tests/results/**/*
- name: Debugging Info
if: always()
run: |
box server log serverConfigFile="server-${{ matrix.cfengine }}.json"
- name: Upload Debugging Info To Artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: Failure Debugging Info - ${{ matrix.cfengine }} - ${{ matrix.jdkVersion }}
path: |
.engine/**/logs/*
.engine/**/WEB-INF/cfusion/logs/*
- name: Slack Notification
# Only on failures and NOT in pull requests
if: ${{ failure() && !startsWith( 'pull_request', github.event_name ) }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: testbox
SLACK_COLOR: ${{ job.status }} # or a specific color like 'green' or '#ff00ff'
SLACK_ICON_EMOJI: ":bell:"
SLACK_MESSAGE: 'TestBox tests failed :cry:, check them out here: https://github.com/Ortus-Solutions/testbox/actions'
SLACK_TITLE: TestBox Tests For ${{ matrix.cfengine }}-${{ matrix.jdkVersion }} failed
SLACK_USERNAME: CI
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}