forked from lucee/extension-hibernate
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (65 loc) · 2.13 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
name: Test
on:
workflow_call:
secrets:
SLACK_WEBHOOK_URL:
required: false
push:
branches-ignore:
- main
- master
- development
- release/**
jobs:
test:
name: Maven Build and Test
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
# We can run tests against any Lucee version, but we can only compile against Lucee releases available on mvnrepository.com.
lucee_version: [ "5" ]
java_version: [ "8", "11", "17" ]
experimental: [ false ]
include:
- lucee_version: "6-snapshot"
java_version: "11"
experimental: true
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: "${{matrix.java_version}}"
distribution: "temurin"
- name: Setup CommandBox CLI
uses: Ortus-Solutions/setup-commandbox@main
- name: Install Dependencies
run: box install
- name: Start Application Server
run: |
cp .env.template .env
box server start cfengine=lucee-light@${{matrix.lucee_version}} --noSaveSettings --debug
- name: Build with Maven
# TODO: Build against Lucee versions in case loader ever changes
# `-Dlucee.version=${{matrix.lucee_version}} `
run: mvn --batch-mode -f pom.xml -Djdk.version=${{matrix.java_version}} package
- name: Deploy Package
run: |
cp target/*.lex .engine/lucee5/WEB-INF/lucee-server/deploy
box server restart
sleep 10s
box server restart
sleep 10s
- name: Run Tests
run: |
mkdir -p tests/results
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: tests/results/**/*.xml
check_name: "Test Results - Lucee ${{matrix.lucee_version}} on JRE ${{matrix.java_version}}"