|
34 | 34 | uses: gradle/actions/setup-gradle@v4 |
35 | 35 | - name: Run ktfmtCheck (qs-kotlin) |
36 | 36 | run: ./gradlew :qs-kotlin:ktfmtCheck --stacktrace |
37 | | - jvm-tests: |
| 37 | + jvm_tests: |
38 | 38 | name: JVM tests (Java ${{ matrix.java }}) |
39 | 39 | runs-on: ubuntu-latest |
40 | 40 | needs: style |
|
66 | 66 | name: qs-kotlin-jvm-${{ matrix.java }} |
67 | 67 | env: |
68 | 68 | CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
69 | | - android-aar: |
| 69 | + android_aar: |
70 | 70 | name: Android AAR (AGP) + unit tests |
71 | 71 | runs-on: ubuntu-latest |
72 | 72 | needs: style |
|
90 | 90 | uses: gradle/actions/setup-gradle@v4 |
91 | 91 | - name: Assemble AAR + run unit tests |
92 | 92 | run: ./gradlew :qs-kotlin-android:assembleRelease :qs-kotlin-android:testReleaseUnitTest --stacktrace |
| 93 | + ensure_compatibility: |
| 94 | + name: Ensure compatibility with qs |
| 95 | + needs: style |
| 96 | + runs-on: ubuntu-latest |
| 97 | + steps: |
| 98 | + - name: Checkout |
| 99 | + uses: actions/checkout@v4 |
| 100 | + - name: Set up Node.js |
| 101 | + uses: actions/setup-node@v4 |
| 102 | + with: |
| 103 | + node-version: '20' |
| 104 | + - name: Install JS dependencies |
| 105 | + run: npm ci |
| 106 | + working-directory: comparison/js |
| 107 | + - name: Run Kotlin comparison |
| 108 | + run: ./gradlew -q :comparison:run --console=plain --warning-mode=none > kotlin.out |
| 109 | + - name: Run Node comparison |
| 110 | + run: node comparison/js/qs.js > node.out |
| 111 | + - name: Show first lines (debug) |
| 112 | + if: ${{ always() }} |
| 113 | + run: | |
| 114 | + echo "=== Kotlin (first 80 lines) ===" |
| 115 | + head -n 80 kotlin.out || true |
| 116 | + echo "=== Node (first 80 lines) ===" |
| 117 | + head -n 80 node.out || true |
| 118 | + - name: Diff outputs |
| 119 | + run: | |
| 120 | + set -eo pipefail |
| 121 | + diff -u node.out kotlin.out > diff.out || (echo "::error::Differences found between Node and Kotlin outputs. See artifact diff.out"; exit 1) |
| 122 | + - name: Upload diff artifacts on failure |
| 123 | + if: failure() |
| 124 | + uses: actions/upload-artifact@v4 |
| 125 | + with: |
| 126 | + name: comparison-diff |
| 127 | + path: | |
| 128 | + node.out |
| 129 | + kotlin.out |
| 130 | + diff.out |
0 commit comments