File tree Expand file tree Collapse file tree 1 file changed +46
-1
lines changed
Expand file tree Collapse file tree 1 file changed +46
-1
lines changed Original file line number Diff line number Diff line change @@ -87,10 +87,55 @@ jobs:
8787 if-no-files-found : error
8888 overwrite : true
8989 retention-days : 7
90+ ensure_compatibility :
91+ name : Ensure compatibility with qs (JS vs C#)
92+ needs : lint
93+ runs-on : ubuntu-latest
94+
95+ steps :
96+ - name : Checkout
97+ uses : actions/checkout@v4
98+ - name : Setup Node.js
99+ uses : actions/setup-node@v4
100+ with :
101+ node-version : ' 20'
102+ - name : Setup .NET
103+ uses : actions/setup-dotnet@v4
104+ with :
105+ dotnet-version : ' 8.0.x'
106+ - name : Install JS dependencies
107+ run : npm install
108+ working-directory : QsNet.Comparison/js
109+ - name : Run C# comparison
110+ run : dotnet run --project QsNet.Comparison -c Release > cs.out
111+ - name : Run Node comparison
112+ run : node QsNet.Comparison/js/qs.js > node.out
113+ - name : Show first lines (debug)
114+ if : ${{ always() }}
115+ run : |
116+ echo "=== C# (first 80 lines) ==="
117+ head -n 80 cs.out || true
118+ echo "=== Node (first 80 lines) ==="
119+ head -n 80 node.out || true
120+ - name : Diff outputs
121+ run : |
122+ set -eo pipefail
123+ diff -u node.out cs.out > diff.out || (echo "::error::Differences found between Node and C# outputs. See artifact diff.out"; exit 1)
124+ - name : Upload diff artifacts on failure
125+ if : failure()
126+ uses : actions/upload-artifact@v4
127+ with :
128+ name : comparison-diff
129+ path : |
130+ node.out
131+ cs.out
132+ diff.out
90133 coverage :
91134 name : Coverage (merged)
92135 runs-on : ubuntu-latest
93- needs : test
136+ needs :
137+ - test
138+ - ensure_compatibility
94139 steps :
95140 - uses : actions/checkout@v4
96141 - name : Setup .NET 8 SDK
You can’t perform that action at this time.
0 commit comments