Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/test_rule_editor_preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ on:
required: false
type: string

concurrency:
group: deploy-dev-slot
cancel-in-progress: false

jobs:
end_to_end_test:
runs-on: ubuntu-latest
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
description: "PR number to test (leave empty for current branch)"
required: false
type: string
pull_request_target:
types: [opened, synchronize, reopened]
env:
DATASET_SIZE_THRESHOLD: 1000000000
jobs:
Expand All @@ -21,7 +23,7 @@
- name: Get Engine Changes
uses: actions/checkout@v4
with:
ref: ${{ inputs.pr_ref || (inputs.pr_number && format('refs/pull/{0}/head', inputs.pr_number)) || github.ref }}
ref: ${{ inputs.pr_ref || (inputs.pr_number && format('refs/pull/{0}/head', inputs.pr_number)) || github.event.pull_request.head.sha || github.ref }}
- name: Get Test Suite Repository
uses: actions/checkout@v4
with:
Expand All @@ -33,33 +35,33 @@
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
pip install -r requirements.txt

- name: Update rules cache

Check failure

Code scanning / CodeQL

Checkout of untrusted code in a privileged context Critical test

Potential execution of untrusted code on a privileged workflow (
pull_request_target
)
env:
CDISC_LIBRARY_API_KEY: ${{ secrets.CDISC_LIBRARY_API_KEY }}
run: |
python core.py update-cache

#############################
# CORE TEST SUITE VALIDATION
#############################

- name: Parse CORE rule list

Check failure

Code scanning / CodeQL

Checkout of untrusted code in a privileged context Critical test

Potential execution of untrusted code on a privileged workflow (
pull_request_target
)
run: |
rules=$(cat CORE_Test_Suite/rulelist/testrulelist.txt | sed 's/^/-r /' | tr '\n' ' ')
echo "RULE_LIST=$rules" >> $GITHUB_ENV
echo "rules to be used: $rules"

- name: Run validation with pandas (CORE)
id: pandas_run
env:
CDISC_LIBRARY_API_KEY: ${{ secrets.CDISC_LIBRARY_API_KEY }}
continue-on-error: true
run: |
python core.py validate -s sdtmig -v 3-3 ${{ env.RULE_LIST }} -d CORE_Test_Suite/data -dxp CORE_Test_Suite/data/Define.xml -of json -o CORE_Test_Suite/pandas-results -l info || true

Check failure

Code scanning / CodeQL

Code injection Critical test

Potential code injection in
${ env.RULE_LIST }
, which may be controlled by an external user (
workflow_dispatch
).
Potential code injection in
${ env.RULE_LIST }
, which may be controlled by an external user (
pull_request_target
).

if [ -f "CORE_Test_Suite/pandas-results.json" ]; then
echo "pandas_success=true" >> $GITHUB_OUTPUT
Expand All @@ -73,34 +75,34 @@
echo "❌ **Failed**: No results file was generated" >> $GITHUB_STEP_SUMMARY
fi

- name: Pandas CORE comparison with template

Check failure

Code scanning / CodeQL

Checkout of untrusted code in a privileged context Critical test

Potential execution of untrusted code on a privileged workflow (
pull_request_target
)
if: steps.pandas_run.outputs.pandas_success == 'true'
continue-on-error: true
run: |
python CORE_Test_Suite/scripts/comparison.py CORE_Test_Suite/pandas-results.json CORE_Test_Suite/CORE-Report.json CORE_Test_Suite/pandas_comparison.xlsx --mode test --json-output CORE_Test_Suite/pandas_comparison.json
echo "pandas_diff=$?" >> $GITHUB_ENV

PANDAS_EXIT_CODE=$?
echo "pandas_diff=$PANDAS_EXIT_CODE" >> $GITHUB_ENV
if [ $PANDAS_EXIT_CODE -eq 0 ]; then
echo "Pandas comparison completed successfully (no differences)"
else
echo "Pandas comparison found differences"
fi

- name: Generate pandas CORE comparison summary

Check failure

Code scanning / CodeQL

Checkout of untrusted code in a privileged context Critical test

Potential execution of untrusted code on a privileged workflow (
pull_request_target
)
if: steps.pandas_run.outputs.pandas_success == 'true'
continue-on-error: true
run: |
python CORE_Test_Suite/scripts/compare_implementations.py CORE_Test_Suite/pandas-results.json CORE_Test_Suite/CORE-Report.json CORE_Test_Suite/pandas_comparison.json --github-step-summary $GITHUB_STEP_SUMMARY --mode test
- name: Run validation with Dask

Check failure

Code scanning / CodeQL

Checkout of untrusted code in a privileged context Critical test

Potential execution of untrusted code on a privileged workflow (
pull_request_target
)
id: dask_run
continue-on-error: true
env:
DATASET_SIZE_THRESHOLD: 0
CDISC_LIBRARY_API_KEY: ${{ secrets.CDISC_LIBRARY_API_KEY }}
run: |
python core.py validate -s sdtmig -v 3-3 ${{ env.RULE_LIST }} -d CORE_Test_Suite/data -dxp CORE_Test_Suite/data/Define.xml -of json -o CORE_Test_Suite/dask-results -l info || true

Check failure

Code scanning / CodeQL

Code injection Critical test

Potential code injection in
${ env.RULE_LIST }
, which may be controlled by an external user (
workflow_dispatch
).
Potential code injection in
${ env.RULE_LIST }
, which may be controlled by an external user (
pull_request_target
).

if [ -f "CORE_Test_Suite/dask-results.json" ]; then
echo "dask_success=true" >> $GITHUB_OUTPUT
Expand All @@ -113,39 +115,39 @@
echo "## Dask Validation" >> $GITHUB_STEP_SUMMARY
echo "❌ **Failed**: No results file was generated" >> $GITHUB_STEP_SUMMARY
fi
- name: Dask comparison script

Check failure

Code scanning / CodeQL

Checkout of untrusted code in a privileged context Critical test

Potential execution of untrusted code on a privileged workflow (
pull_request_target
)
continue-on-error: true
if: steps.dask_run.outputs.dask_success == 'true'
run: |
python CORE_Test_Suite/scripts/comparison.py CORE_Test_Suite/dask-results.json CORE_Test_Suite/CORE-Report.json CORE_Test_Suite/dask_comparison.xlsx --mode test --json-output CORE_Test_Suite/dask_comparison.json
DASK_EXIT_CODE=$?
echo "dask_diff=$DASK_EXIT_CODE" >> $GITHUB_ENV
if [ $DASK_EXIT_CODE -eq 0 ]; then
echo "Dask comparison completed successfully (no differences)"
else
echo "Dask comparison found differences"

- name: Generate dask comparison summary

Check failure

Code scanning / CodeQL

Checkout of untrusted code in a privileged context Critical test

Potential execution of untrusted code on a privileged workflow (
pull_request_target
)
if: steps.dask_run.outputs.dask_success == 'true'
continue-on-error: true
run: |
python CORE_Test_Suite/scripts/compare_implementations.py CORE_Test_Suite/dask-results.json CORE_Test_Suite/CORE-Report.json CORE_Test_Suite/dask_comparison.json --github-step-summary $GITHUB_STEP_SUMMARY --mode test

#################################
# USDM TEST SUITE VALIDATION
#################################

- name: Parse USDM rule list

Check failure

Code scanning / CodeQL

Checkout of untrusted code in a privileged context Critical test

Potential execution of untrusted code on a privileged workflow (
pull_request_target
)
run: |
usdm_rules=$(cat CORE_Test_Suite/rulelist/USDM_Test_Suite_Rules.txt | sed 's/\r$//' | sed 's/^/-r /' | tr '\n' ' ')
echo "USDM_RULE_LIST=$usdm_rules" >> $GITHUB_ENV
echo "USDM rules: $usdm_rules"

- name: Run USDM validation (Negative)
id: usdm_neg
continue-on-error: true
run: |
python core.py validate -s usdm -v 3-0 ${{ env.USDM_RULE_LIST }} -dp CORE_Test_Suite/usdm_data/USDM_Test_Suite_negative.json -of json -o CORE_Test_Suite/usdm_negative_report -l error || true

Check failure

Code scanning / CodeQL

Code injection Critical test

Potential code injection in
${ env.USDM_RULE_LIST }
, which may be controlled by an external user (
workflow_dispatch
).
Potential code injection in
${ env.USDM_RULE_LIST }
, which may be controlled by an external user (
pull_request_target
).

if [ -f "CORE_Test_Suite/usdm_negative_report.json" ]; then
echo "usdm_neg_success=true" >> $GITHUB_OUTPUT
Expand All @@ -157,30 +159,30 @@
echo "**Failed**: No results for negative test" >> $GITHUB_STEP_SUMMARY
fi

- name: Compare USDM negative result

Check failure

Code scanning / CodeQL

Checkout of untrusted code in a privileged context Critical test

Potential execution of untrusted code on a privileged workflow (
pull_request_target
)
if: steps.usdm_neg.outputs.usdm_neg_success == 'true'
continue-on-error: true
run: |
python CORE_Test_Suite/scripts/comparison.py CORE_Test_Suite/usdm_negative_report.json CORE_Test_Suite/USDM_Negative_Result.json CORE_Test_Suite/usdm_negative_comparison.xlsx --mode test --json-output CORE_Test_Suite/usdm_negative_comparison.json
USDM_NEG_EXIT_CODE=$?
echo "usdm_neg_diff=$USDM_NEG_EXIT_CODE" >> $GITHUB_ENV
if [ $USDM_NEG_EXIT_CODE -eq 0 ]; then
echo "USDM negative comparison completed successfully (no differences)"
else
echo "USDM negative comparison found differences"
fi

- name: Generate USDM negative comparison summary

Check failure

Code scanning / CodeQL

Checkout of untrusted code in a privileged context Critical test

Potential execution of untrusted code on a privileged workflow (
pull_request_target
)
if: steps.usdm_neg.outputs.usdm_neg_success == 'true'
continue-on-error: true
run: |
python CORE_Test_Suite/scripts/compare_implementations.py CORE_Test_Suite/usdm_negative_report.json CORE_Test_Suite/USDM_Negative_Result.json CORE_Test_Suite/usdm_negative_comparison.json --github-step-summary $GITHUB_STEP_SUMMARY --mode test

- name: Run USDM validation (Positive)

Check failure

Code scanning / CodeQL

Checkout of untrusted code in a privileged context Critical test

Potential execution of untrusted code on a privileged workflow (
pull_request_target
)
id: usdm_pos
continue-on-error: true
run: |
python core.py validate -s usdm -v 3-0 ${{ env.USDM_RULE_LIST }} -dp CORE_Test_Suite/usdm_data/USDM_Test_Suite_positive.json -of json -o CORE_Test_Suite/usdm_positive_report -l error || true

Check failure

Code scanning / CodeQL

Code injection Critical test

Potential code injection in
${ env.USDM_RULE_LIST }
, which may be controlled by an external user (
workflow_dispatch
).
Potential code injection in
${ env.USDM_RULE_LIST }
, which may be controlled by an external user (
pull_request_target
).

if [ -f "CORE_Test_Suite/usdm_positive_report.json" ]; then
echo "usdm_pos_success=true" >> $GITHUB_OUTPUT
Expand All @@ -192,29 +194,29 @@
echo "**Failed**: No results for positive test" >> $GITHUB_STEP_SUMMARY
fi

- name: Compare USDM positive result

Check failure

Code scanning / CodeQL

Checkout of untrusted code in a privileged context Critical test

Potential execution of untrusted code on a privileged workflow (
pull_request_target
)
if: steps.usdm_pos.outputs.usdm_pos_success == 'true'
continue-on-error: true
run: |
python CORE_Test_Suite/scripts/comparison.py CORE_Test_Suite/usdm_positive_report.json CORE_Test_Suite/USDM_Positive_Result.json CORE_Test_Suite/usdm_positive_comparison.xlsx --mode test --json-output CORE_Test_Suite/usdm_positive_comparison.json
USDM_POS_EXIT_CODE=$?
echo "usdm_pos_diff=$USDM_POS_EXIT_CODE" >> $GITHUB_ENV
if [ $USDM_POS_EXIT_CODE -eq 0 ]; then
echo "USDM positive comparison completed successfully (no differences)"
else
echo "USDM positive comparison found differences"
fi

- name: Generate USDM positive comparison summary

Check failure

Code scanning / CodeQL

Checkout of untrusted code in a privileged context Critical test

Potential execution of untrusted code on a privileged workflow (
pull_request_target
)
if: steps.usdm_pos.outputs.usdm_pos_success == 'true'
continue-on-error: true
run: |
python CORE_Test_Suite/scripts/compare_implementations.py CORE_Test_Suite/usdm_positive_report.json CORE_Test_Suite/USDM_Positive_Result.json CORE_Test_Suite/usdm_positive_comparison.json --github-step-summary $GITHUB_STEP_SUMMARY --mode test

#######################
# UPLOAD ALL RESULTS
#######################
- name: Upload test results

Check failure

Code scanning / CodeQL

Checkout of untrusted code in a privileged context Critical test

Potential execution of untrusted code on a privileged workflow (
pull_request_target
)
if: always()
uses: actions/upload-artifact@v4
with:
Expand Down
Loading