Commit 6a885175 authored by canterburym's avatar canterburym
Browse files

Trying new pipeline

parent de4c9b76
Loading
Loading
Loading
Loading
Loading
+19 −28
Original line number Diff line number Diff line
image: "mcanterb/forge-cicd:latest"
image: "mcanterb/asn1test:latest"

before_script:
  - python3 --version

stages:
  - Syntax
  - CompileAndLint
  - Merge
  - process
  - check

checkXSD:
  stage: Syntax
process_asn:
  stage: process
  interruptible: true
  script:
  - python3 testing/check_xsd.py

parseASN1:
  stage: Syntax
  script:
  - python3 testing/parse_asn1.py

compileASN1:
  stage: CompileAndLint
  script:
  - python3 testing/compile_asn1.py

lintASN1:
  stage: CompileAndLint
  script:
  - python3 testing/lint_asn1.py
  allow_failure: true

MergeTest:
  stage: Merge
    - python3 testing/asn_process.py
  artifacts:
    paths:
      - testing/asn_compile_results.json
      - testing/asn_parse_results.json
    expire_in: 1 day

check_asn_parse:
  stage: check
  interruptible: true
  dependencies:
    - process_asn
  script:
  - python3 testing/merge_test.py

    - python3 testing/asn_check_parsing.py
+19 −0
Original line number Diff line number Diff line
from pathlib import Path
import json

if __name__ == "__main__":
    parseResults = json.loads(Path('testing/asn_parse_results.json').read_text())

    print(f"{'-':-<60}")
    print("Parser results:")
    print(f"{'-':-<60}")
    for filename, result in parseResults['results'].items():
        print(f" {filename:.<55}{'..OK' if result['ok'] else 'FAIL'}")
        if not result['ok']:
            print(f"    {result['msg']}")
    
    print(f"{'-':-<60}")
    print(f"Parser errors: {parseResults['errorCount']}")
    print(f"{'-':-<60}")
 
    exit(parseResults['errorCount'])
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
{"errorCount": 0, "results": {"./33128/r15/TS33128Payloads.asn": {"ok": true}, "./33128/r16/TS33128Payloads.asn": {"ok": true}, "./33128/r16/TS33128IdentityAssociation.asn": {"ok": true}, "./33128/r17/TS33128Payloads.asn": {"ok": true}, "./33128/r17/TS33128IdentityAssociation.asn": {"ok": true}, "./testing/mod1.asn": {"ok": true}}}
 No newline at end of file
+19 −0
Original line number Diff line number Diff line
[
    ["./33128/r15/TS33128Payloads.asn"],
    ["./33128/r16/TS33128Payloads.asn"],
    ["./33128/r16/TS33128IdentityAssociation.asn"],
    [
        "./33128/r17/TS33128Payloads.asn",
        "./33108/r16/EpsHI2Operations.asn",
        "./33108/r16/UmtsHI2Operations.asn",
        "./testing/dependencies/asn/HI2Operations,ver18.asn",
        "./testing/dependencies/asn/101909/TS101909201.asn",
        "./testing/dependencies/asn/101909/PCESP.asn",
        "./testing/dependencies/asn/301040/06132v203_C01.asn"
    ],
    ["./33128/r17/TS33128IdentityAssociation.asn"],
    [
        "./testing/mod1.asn", 
        "./testing/mod2.asn"
    ]
]
 No newline at end of file

testing/asn_ignore.txt

0 → 100644
+1 −0
Original line number Diff line number Diff line
33108
 No newline at end of file
Loading