1111jobs :
1212 unit_tests :
1313 name : " Unit tests"
14+ permissions :
15+ contents : read
1416 runs-on : ubuntu-latest
1517 steps :
1618 - name : Checkout repository
5456 coverage-artifact-name : " code-coverage"
5557 coverage-file-name : " coverage.txt"
5658
57- integration_tests :
58- name : " Integration tests"
59+ build_cli :
60+ name : " Build CLI"
61+ permissions :
62+ contents : read
5963 runs-on : ubuntu-latest
6064 steps :
6165 - uses : actions/checkout@v4
@@ -68,18 +72,91 @@ jobs:
6872 - name : Build
6973 run : go build -o bin/mxlint "./"
7074
75+ - name : Archive mxlint binary
76+ uses : actions/upload-artifact@v4
77+ with :
78+ name : mxlint-cli
79+ path : bin
80+
81+ test_export_model_v1 :
82+ name : " Test export-model mpr-v1"
83+ permissions :
84+ contents : read
85+ needs : build_cli
86+ runs-on : ubuntu-latest
87+ steps :
88+ - uses : actions/checkout@v4
89+
90+ - name : Download mxlint binary
91+ uses : actions/download-artifact@v4
92+ with :
93+ name : mxlint-cli
94+ path : bin
95+
7196 - name : Test subcommand export-model mpr-v1
7297 run : |
98+ chmod +x ./bin/mxlint
7399 bin/mxlint export-model --mode basic -i resources/app-mpr-v1 -o resources/modelsource-v1
74100 git diff --exit-code resources/modelsource-v1
75101
102+ test_export_model_v2 :
103+ name : " Test export-model mpr-v2"
104+ permissions :
105+ contents : read
106+ needs : build_cli
107+ runs-on : ubuntu-latest
108+ steps :
109+ - uses : actions/checkout@v4
110+
111+ - name : Download mxlint binary
112+ uses : actions/download-artifact@v4
113+ with :
114+ name : mxlint-cli
115+ path : bin
116+
76117 - name : Test subcommand export-model mpr-v2
77118 run : |
119+ chmod +x ./bin/mxlint
78120 bin/mxlint export-model --mode basic -i resources/app-mpr-v2 -o resources/modelsource-v2
79121 git diff --exit-code resources/modelsource-v2
80122
123+ test_lint :
124+ name : " Test lint"
125+ permissions :
126+ contents : read
127+ needs : build_cli
128+ runs-on : ubuntu-latest
129+ steps :
130+ - uses : actions/checkout@v4
131+
132+ - name : Download mxlint binary
133+ uses : actions/download-artifact@v4
134+ with :
135+ name : mxlint-cli
136+ path : bin
137+
81138 - name : Test subcommand lint
82- run : ./bin/mxlint lint --xunit-report report.xml --rules ./resources/rules -m resources/app-mpr-v1
139+ run : |
140+ chmod +x ./bin/mxlint
141+ ./bin/mxlint lint --xunit-report report.xml --rules ./resources/rules -m resources/app-mpr-v1
142+
143+
144+ test_rules :
145+ name : " Test rules"
146+ permissions :
147+ contents : read
148+ needs : build_cli
149+ runs-on : ubuntu-latest
150+ steps :
151+ - uses : actions/checkout@v4
152+
153+ - name : Download mxlint binary
154+ uses : actions/download-artifact@v4
155+ with :
156+ name : mxlint-cli
157+ path : bin
83158
84159 - name : Test subcommand test-rules
85- run : ./bin/mxlint test-rules --rules ./resources/rules
160+ run : |
161+ chmod +x ./bin/mxlint
162+ ./bin/mxlint test-rules --rules ./resources/rules
0 commit comments