From 07dea8936e8443c2f93afff2e464375ec354f740 Mon Sep 17 00:00:00 2001 From: Sushmitha-MN Date: Wed, 11 Feb 2026 13:31:57 +0530 Subject: [PATCH 1/3] Adding unit tests for ASN1 CryptoInterface NanoCrypto --- .github/workflows/unittest_asn1_extended.yml | 50 +++++++++++++++++++ .../unittest_cryptointerface_extended.yml | 49 ++++++++++++++++++ .../unittest_nanocrypto_extended.yml | 34 +++++++++++++ 3 files changed, 133 insertions(+) create mode 100644 .github/workflows/unittest_asn1_extended.yml create mode 100644 .github/workflows/unittest_cryptointerface_extended.yml create mode 100644 .github/workflows/unittest_nanocrypto_extended.yml diff --git a/.github/workflows/unittest_asn1_extended.yml b/.github/workflows/unittest_asn1_extended.yml new file mode 100644 index 0000000..a0d42f7 --- /dev/null +++ b/.github/workflows/unittest_asn1_extended.yml @@ -0,0 +1,50 @@ +name: "Unit Test ASN1 Extended" + +on: + workflow_dispatch: {} + + push: + branches: [ "DTM-7533-create-github-action-for-unit-tests" ] + + schedule: + - cron: '30 6 * * 1' # Monday 12:00 PM IST + - cron: '30 6 * * 3' # Wednesday 12:00 PM IST + +jobs: + unittest-asn1-extended: + runs-on: ubuntu-latest + + env: + GIT_TOKEN: ${{ secrets.MY_SECRET_TOKEN }} + + steps: + - name: Checkout current repository + uses: actions/checkout@v4 + + - name: Install Dependencies + run: | + sudo apt update + sudo apt install -y cproto + sudo apt install -y ruby + sudo apt install -y build-essential + sudo apt install -y cmake + sudo apt install -y python3 python3-pip + + # ------------------------------------------------------------------ + # Clone & prepare mocn-qa-m-products + # ------------------------------------------------------------------ + - name: Clone mocn-qa-m-products + run: | + git clone https://${GIT_TOKEN}@github.com/digicert/mocn-qa-m-products.git + + # ------------------------------------------------------------------ + # Copy script and run check + # ------------------------------------------------------------------ + - name: Copy Jenkins check script + run: | + cp mocn-qa-m-products/qa_utils/check_jenkins_build_script_result/run_check_script.py . + + - name: Running Unittest ASN1 Extended + run: | + PYTHONUNBUFFERED=1 python3 run_check_script.py "projects/asn1_unittest" "default" + diff --git a/.github/workflows/unittest_cryptointerface_extended.yml b/.github/workflows/unittest_cryptointerface_extended.yml new file mode 100644 index 0000000..694efaa --- /dev/null +++ b/.github/workflows/unittest_cryptointerface_extended.yml @@ -0,0 +1,49 @@ +name: "Unit Test CryptoInterface Extended" + +on: + workflow_dispatch: {} + + push: + branches: [ "DTM-7533-create-github-action-for-unit-tests" ] + + schedule: + - cron: '30 7 * * 1' # Monday 1:00 PM IST + - cron: '30 7 * * 3' # Wednesday 1:00 PM IST + +jobs: + unittest-cryptointerface-extended: + runs-on: ubuntu-latest + + env: + GIT_TOKEN: ${{ secrets.MY_SECRET_TOKEN }} + + steps: + - name: Checkout current repository + uses: actions/checkout@v4 + + - name: Install Dependencies + run: | + sudo apt update + sudo apt install -y cproto + sudo apt install -y ruby + sudo apt install -y build-essential + sudo apt install -y cmake + sudo apt install -y python3 python3-pip + + # ------------------------------------------------------------------ + # Clone & prepare mocn-qa-m-products + # ------------------------------------------------------------------ + - name: Clone mocn-qa-m-products + run: | + git clone https://${GIT_TOKEN}@github.com/digicert/mocn-qa-m-products.git + + # ------------------------------------------------------------------ + # Copy script and run check + # ------------------------------------------------------------------ + - name: Copy Jenkins check script + run: | + cp mocn-qa-m-products/qa_utils/check_jenkins_build_script_result/run_check_script.py . + + - name: Running Unittest CryptoInterface Extended + run: | + PYTHONUNBUFFERED=1 python run_check_script.py "projects/cryptointerface_unittest" "build_and_run_all.sh" diff --git a/.github/workflows/unittest_nanocrypto_extended.yml b/.github/workflows/unittest_nanocrypto_extended.yml new file mode 100644 index 0000000..34eb5c3 --- /dev/null +++ b/.github/workflows/unittest_nanocrypto_extended.yml @@ -0,0 +1,34 @@ +name: "Unit Test NanoCrypto Extended" + +on: + workflow_dispatch: {} + + push: + branches: [ "DTM-7533-create-github-action-for-unit-tests" ] + + schedule: + - cron: '30 9 * * 1' # Monday 3:00 PM IST + - cron: '30 9 * * 3' # Wednesday 3:00 PM IST + +jobs: + unittest-nanocrypto-extended: + runs-on: ubuntu-latest + + steps: + - name: Checkout current repository + uses: actions/checkout@v4 + + - name: Install Dependencies + run: | + sudo apt update + sudo apt install -y cproto + sudo apt install -y ruby + sudo apt install -y build-essential + sudo apt install -y cmake + sudo apt install -y python3 python3-pip + + - name: Running Unittest NanoCrypto Extended + run: | + cd projects/crypto_unittest + ./build.sh + ./run.sh From 945ac332946334298026436cca1a786ac22ba420 Mon Sep 17 00:00:00 2001 From: Sushmitha-MN Date: Wed, 11 Feb 2026 14:36:37 +0530 Subject: [PATCH 2/3] Final commit --- .github/workflows/unittest_asn1_extended.yml | 3 --- .github/workflows/unittest_cryptointerface_extended.yml | 3 --- .github/workflows/unittest_nanocrypto_extended.yml | 3 --- 3 files changed, 9 deletions(-) diff --git a/.github/workflows/unittest_asn1_extended.yml b/.github/workflows/unittest_asn1_extended.yml index a0d42f7..22b985c 100644 --- a/.github/workflows/unittest_asn1_extended.yml +++ b/.github/workflows/unittest_asn1_extended.yml @@ -3,9 +3,6 @@ name: "Unit Test ASN1 Extended" on: workflow_dispatch: {} - push: - branches: [ "DTM-7533-create-github-action-for-unit-tests" ] - schedule: - cron: '30 6 * * 1' # Monday 12:00 PM IST - cron: '30 6 * * 3' # Wednesday 12:00 PM IST diff --git a/.github/workflows/unittest_cryptointerface_extended.yml b/.github/workflows/unittest_cryptointerface_extended.yml index 694efaa..5c5177b 100644 --- a/.github/workflows/unittest_cryptointerface_extended.yml +++ b/.github/workflows/unittest_cryptointerface_extended.yml @@ -3,9 +3,6 @@ name: "Unit Test CryptoInterface Extended" on: workflow_dispatch: {} - push: - branches: [ "DTM-7533-create-github-action-for-unit-tests" ] - schedule: - cron: '30 7 * * 1' # Monday 1:00 PM IST - cron: '30 7 * * 3' # Wednesday 1:00 PM IST diff --git a/.github/workflows/unittest_nanocrypto_extended.yml b/.github/workflows/unittest_nanocrypto_extended.yml index 34eb5c3..66b6820 100644 --- a/.github/workflows/unittest_nanocrypto_extended.yml +++ b/.github/workflows/unittest_nanocrypto_extended.yml @@ -3,9 +3,6 @@ name: "Unit Test NanoCrypto Extended" on: workflow_dispatch: {} - push: - branches: [ "DTM-7533-create-github-action-for-unit-tests" ] - schedule: - cron: '30 9 * * 1' # Monday 3:00 PM IST - cron: '30 9 * * 3' # Wednesday 3:00 PM IST From 3f314f58b1654104c827c96dbb6097166a05f7d2 Mon Sep 17 00:00:00 2001 From: Sushmitha-MN Date: Wed, 11 Feb 2026 19:15:56 +0530 Subject: [PATCH 3/3] Cloning in a diff way --- .github/workflows/unittest_asn1_extended.yml | 12 ++++++------ .../workflows/unittest_cryptointerface_extended.yml | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/unittest_asn1_extended.yml b/.github/workflows/unittest_asn1_extended.yml index 22b985c..0c0c989 100644 --- a/.github/workflows/unittest_asn1_extended.yml +++ b/.github/workflows/unittest_asn1_extended.yml @@ -11,9 +11,6 @@ jobs: unittest-asn1-extended: runs-on: ubuntu-latest - env: - GIT_TOKEN: ${{ secrets.MY_SECRET_TOKEN }} - steps: - name: Checkout current repository uses: actions/checkout@v4 @@ -30,9 +27,12 @@ jobs: # ------------------------------------------------------------------ # Clone & prepare mocn-qa-m-products # ------------------------------------------------------------------ - - name: Clone mocn-qa-m-products - run: | - git clone https://${GIT_TOKEN}@github.com/digicert/mocn-qa-m-products.git + - name: Checkout mocn-qa-m-products + uses: actions/checkout@v4 + with: + repository: digicert/mocn-qa-m-products + token: ${{ secrets.MY_SECRET_TOKEN }} + path: mocn-qa-m-products # ------------------------------------------------------------------ # Copy script and run check diff --git a/.github/workflows/unittest_cryptointerface_extended.yml b/.github/workflows/unittest_cryptointerface_extended.yml index 5c5177b..092875f 100644 --- a/.github/workflows/unittest_cryptointerface_extended.yml +++ b/.github/workflows/unittest_cryptointerface_extended.yml @@ -11,9 +11,6 @@ jobs: unittest-cryptointerface-extended: runs-on: ubuntu-latest - env: - GIT_TOKEN: ${{ secrets.MY_SECRET_TOKEN }} - steps: - name: Checkout current repository uses: actions/checkout@v4 @@ -30,9 +27,12 @@ jobs: # ------------------------------------------------------------------ # Clone & prepare mocn-qa-m-products # ------------------------------------------------------------------ - - name: Clone mocn-qa-m-products - run: | - git clone https://${GIT_TOKEN}@github.com/digicert/mocn-qa-m-products.git + - name: Checkout mocn-qa-m-products + uses: actions/checkout@v4 + with: + repository: digicert/mocn-qa-m-products + token: ${{ secrets.MY_SECRET_TOKEN }} + path: mocn-qa-m-products # ------------------------------------------------------------------ # Copy script and run check