fix: pom.xml to reduce vulnerabilities #35
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}}" |