Skip to content

Commit

Permalink
Add Functional E2E tests. Fix one failing test. Allow security report…
Browse files Browse the repository at this point in the history
…s to be written
  • Loading branch information
jamesrwelch committed Jul 17, 2024
1 parent 6a47720 commit cb8dcad
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 2 deletions.
21 changes: 21 additions & 0 deletions .github/actions/e2e-composite/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 'End-to-end testing composite'
description: 'Run MDM-Core End-to-end functional tests'
inputs:
package:
description: 'The package to be tested'
required: true
runs:
using: 'composite'
steps:
- name: 'E2E Functional Test: ${{ inputs.package }}'
run: ./gradlew -Dgradle.test.package=${{ inputs.package }} :mdm-testing-functional:integrationTest

- name: 'E2E Functional Test Report: ${{ inputs.package }}'
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: 'E2E Functional Test Results: ${{ inputs.package }}'
path: mdm-testing-functional/build/test-results/${{ inputs.package }}/*.xml
reporter: java-junit
list-suites: 'failed'
list-tests: 'failed'
46 changes: 45 additions & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ permissions:
contents: read
actions: read
checks: write
security-events: write

jobs:
build:
Expand Down Expand Up @@ -137,6 +138,50 @@ jobs:
reporter: java-junit
list-tests: 'failed'

- uses: ./.github/actions/e2e-composite
with:
package: core

- uses: ./.github/actions/e2e-composite
with:
package: security

- uses: ./.github/actions/e2e-composite
with:
package: authentication

- uses: ./.github/actions/e2e-composite
with:
package: datamodel

- uses: ./.github/actions/e2e-composite
with:
package: terminology

- uses: ./.github/actions/e2e-composite
with:
package: referencedata

- uses: ./.github/actions/e2e-composite
with:
package: profile

- uses: ./.github/actions/e2e-composite
with:
package: dataflow

- uses: ./.github/actions/e2e-composite
with:
package: federation

- uses: ./.github/actions/e2e-composite
with:
package: facet

- uses: ./.github/actions/e2e-composite
with:
package: versionedfolder

# - name: Archive test report
# if: always()
# uses: actions/upload-artifact@v3
Expand All @@ -150,7 +195,6 @@ jobs:
# All available variables are described in documentation
# https://megalinter.io/configuration/
VALIDATE_ALL_CODEBASE: true

ENABLE_LINTERS: GROOVY_NPM_GROOVY_LINT
LINTER_RULES_PATH: 'config/codenarc'
DISABLE_ERRORS: true #Flag to have the linter complete with exit code 0 even if errors were detected.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class AdminFunctionalSpec extends FunctionalSpec {
"Java Version": "${json-unit.regex}17.*",
"Java Vendor": "${json-unit.any-string}",
"OS Name": "${json-unit.any-string}",
"OS Version": "${json-unit.matches:version}",
"OS Version": "${json-unit.any-string}",
"OS Architecture": "${json-unit.any-string}",
"Driver Manager Drivers Available": [
{
Expand Down

0 comments on commit cb8dcad

Please sign in to comment.