From ef49e92ce52cdce9c10a85ad28c7c26a314a303e Mon Sep 17 00:00:00 2001 From: Xiwen Cheng Date: Fri, 27 Mar 2026 22:00:45 +0100 Subject: [PATCH 1/3] use new config system instead of flags --- .github/workflows/ci.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e25375..80ea334 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,15 +26,26 @@ jobs: rm modelsource.zip rm -rf mxlint-cli-* - - name: Lint XML output + - name: Lint report run: | - ./bin/mxlint lint --xunit-report report.xml --rules ./rules --modelsource ./modelsource || true - cat report.xml + mkdir -p .ci + cat > .ci/lint.yaml << 'EOF' + rules: + path: ./rules + modelsource: ./modelsource + lint: + xunitReport: report.xml + jsonFile: report.json + EOF + ./bin/mxlint --config .ci/lint.yaml lint + + - name: Check XML output + run: | + [ -f report.xml ] && cat report.xml || echo "report.xml was not generated" - - name: Lint JSON output + - name: Check JSON output run: | - ./bin/mxlint lint --json-file report.json --rules ./rules --modelsource ./modelsource || true - cat report.json + [ -f report.json ] && cat report.json || echo "report.json was not generated" - name: Upload report uses: actions/upload-artifact@v4 From 8b74cf9b35a7eed1d72553758d30a3fb9fe79b1b Mon Sep 17 00:00:00 2001 From: Xiwen Cheng Date: Fri, 27 Mar 2026 22:02:51 +0100 Subject: [PATCH 2/3] verify output format --- .github/workflows/ci.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 80ea334..7d123fa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,11 +41,21 @@ jobs: - name: Check XML output run: | - [ -f report.xml ] && cat report.xml || echo "report.xml was not generated" + if [ ! -f report.xml ]; then + echo "report.xml was not generated" + exit 1 + fi + python3 -c "import xml.etree.ElementTree as ET; ET.parse('report.xml')" + cat report.xml - name: Check JSON output run: | - [ -f report.json ] && cat report.json || echo "report.json was not generated" + if [ ! -f report.json ]; then + echo "report.json was not generated" + exit 1 + fi + python3 -c "import json; json.load(open('report.json'))" + cat report.json - name: Upload report uses: actions/upload-artifact@v4 From 21e11f426c806eca71dfd8e2359e520fc9413ed1 Mon Sep 17 00:00:00 2001 From: Xiwen Cheng Date: Fri, 27 Mar 2026 22:04:10 +0100 Subject: [PATCH 3/3] linting can fail. It is ok --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d123fa..b14ad7c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,7 @@ jobs: xunitReport: report.xml jsonFile: report.json EOF - ./bin/mxlint --config .ci/lint.yaml lint + ./bin/mxlint --config .ci/lint.yaml lint || true - name: Check XML output run: |