-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix formalize attributes config name and line-endings issue + setup g…
…ithub workflow (#1) * Fixed naming error from formalizeExtendedAtrributes to formalizeExtendedAttributes. * Refactored PowerDeComposerTest into PowerDeComposer maven project. Updated pom to include needed dependencies, updated scm paths, updated executable jar creation to be in line with XG. * Added github workflows. * Updated pom schemagen settings. Updated xsd using schemagen. Updated gitignore. Removed azure pipeline and generate jar scripts. * Removed episode file. * Updated logging properties so everything is not logged twice. * Added unit tests for new line handing in compose phase. Refactired Steps a bit to support prepared test files (separate from runtime). * Created gitattributes file for test files (to make sure CR and CRLF are captured in Git as created). * Updated line enddings in Git after gitattributes setting. * Added matrix in job to run on windows and linux. * Removed vscode settings. * Disabled fail-fast in workflow job. * Added os and java version to test result name. Add condition for publishing jar only in linux run. * Refactored logging to use global logger and setup INFO for normal use and FINE for testing. * Updated spaces/tabs in feature file. Removed unneeded semi-colon. * Changed all feature files from LF to CRLF. Added closing streams when writing file. * Updated Steps to always have CRLF for inline Cucumber content (and not otherwise). * Added java version to jar artifact. Added jdk 17 to matrix. * Added tests (with steps) to verify new-line handling on Decompose process. * Refactored getVTDNav function in XmlUtils to work in byte[] so we can pass the byte[] of an XML fargment, i.s.o. the string. Changed decomposer to get the byte[] of the decompose file parts to solve the line-ending issue.
- Loading branch information
Showing
63 changed files
with
2,115 additions
and
1,857 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
on: | ||
workflow_call: | ||
|
||
env: | ||
MAVEN_VERSION: 3.8.6 | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
build-and-test: | ||
strategy: | ||
# Don't fail other run's if one fails. Let them all finish. | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
java: [11, 17] | ||
|
||
name: Build and test | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 60 | ||
steps: | ||
# Checkout the code | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
# Setup Java | ||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '${{ matrix.java }}' | ||
distribution: 'temurin' | ||
architecture: x64 | ||
cache: 'maven' | ||
|
||
# Build with Maven | ||
- name: Build | ||
run: mvn --batch-mode install -DskipTests | ||
working-directory: ./PowerDeComposer | ||
|
||
# Test with Maven | ||
- name: Run Unit Tests | ||
run: mvn --batch-mode test -Dtest="RunPDCUnitTest" | ||
working-directory: ./PowerDeComposer | ||
|
||
- name: Test Report | ||
uses: phoenix-actions/test-reporting@v12 | ||
id: test-report # Set ID reference for step | ||
if: success() || failure() # run this step even if previous step failed | ||
with: | ||
name: test-results-${{ matrix.os }}-java-${{ matrix.java }} | ||
path: PowerDeComposer/target/surefire-reports/TEST-*.xml | ||
reporter: java-junit | ||
|
||
# Build single jar | ||
- name: Assemble Jar | ||
if: runner.os == 'Linux' | ||
run: mvn --batch-mode assembly:single -DskipTests | ||
working-directory: ./PowerDeComposer | ||
|
||
# Publish jars. | ||
- uses: actions/upload-artifact@v4 | ||
if: runner.os == 'Linux' | ||
with: | ||
name: jar-without-dependencies-java-${{ matrix.java }} | ||
path: PowerDeComposer/target/PowerDeComposer-*[0-9].jar | ||
compression-level: 0 # no compression, since jar is already compressed | ||
- uses: actions/upload-artifact@v4 | ||
if: runner.os == 'Linux' | ||
with: | ||
name: jar-with-dependencies-java-${{ matrix.java }} | ||
path: PowerDeComposer/target/PowerDeComposer-*[0-9]-jar-with-dependencies.jar | ||
compression-level: 0 # no compression, since jar is already compressed |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: cicd-feature | ||
|
||
on: | ||
push: | ||
branches: | ||
- feature/* | ||
pull_request: | ||
branches: | ||
- feature/* | ||
|
||
jobs: | ||
build-and-test: | ||
uses: ./.github/workflows/build-and-test.yml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: cicd-main | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-and-test: | ||
uses: ./.github/workflows/build-and-test.yml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,3 @@ target | |
/bin/ | ||
/target/ | ||
**/*.xjb | ||
PowerDeComposer/src/main/resources/com/xbreeze/xml/config/schema1.xsd |
This file was deleted.
Oops, something went wrong.
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
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
Oops, something went wrong.