Splitpane drag symmetry (#211) #303
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| workflow_call: | |
| # Concurrency settings to prevent conflicts | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| cache: sbt | |
| - name: Setup sbt | |
| uses: sbt/setup-sbt@v1 | |
| - name: Scala 3 style syntax gate | |
| run: ./scripts/check_scala3_style.sh | |
| - name: Widget docs coverage gate | |
| run: ./scripts/check_widget_docs.sh | |
| - name: CI checks (format, scalafix, test) | |
| run: sbt --batch ciCheck | |
| - name: Sample app smoke (non-interactive) | |
| run: ./scripts/ci_sample_smoke.sh | |
| - name: Coverage tests (Scala 3 only) | |
| run: sbt --batch coverageLib | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: | | |
| modules/termflow-terminal/target/scala-*/scoverage-report/scoverage.xml | |
| modules/termflow-screen/target/scala-*/scoverage-report/scoverage.xml | |
| modules/termflow-app/target/scala-*/scoverage-report/scoverage.xml | |
| modules/termflow-widgets/target/scala-*/scoverage-report/scoverage.xml | |
| slug: llm4s/termflow | |
| fail_ci_if_error: false | |
| verbose: true | |
| - name: Upload coverage report artifact | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: scoverage-report | |
| path: | | |
| modules/termflow-terminal/target/scala-*/scoverage-report/ | |
| modules/termflow-screen/target/scala-*/scoverage-report/ | |
| modules/termflow-app/target/scala-*/scoverage-report/ | |
| modules/termflow-widgets/target/scala-*/scoverage-report/ | |
| retention-days: 14 | |
| - name: Coverage summary (informational) | |
| if: always() | |
| continue-on-error: true | |
| run: | | |
| # Sum statement-count + statement-rate across the four framework | |
| # modules to produce a single library-wide coverage figure. | |
| TOTAL=0 | |
| COVERED=0 | |
| for m in termflow-terminal termflow-screen termflow-app termflow-widgets; do | |
| REPORT=$(ls modules/$m/target/scala-*/scoverage-report/scoverage.xml 2>/dev/null | head -n1) | |
| if [ -n "$REPORT" ]; then | |
| CNT=$(grep -oE 'statement-count="[0-9]+"' "$REPORT" | head -n1 | cut -d'"' -f2) | |
| RATE=$(grep -oE 'statement-rate="[0-9.]+"' "$REPORT" | head -n1 | cut -d'"' -f2) | |
| if [ -n "$CNT" ] && [ -n "$RATE" ]; then | |
| MOD_COVERED=$(awk "BEGIN { printf \"%.0f\", $CNT * $RATE / 100.0 }") | |
| TOTAL=$((TOTAL + CNT)) | |
| COVERED=$((COVERED + MOD_COVERED)) | |
| echo "$m: ${RATE}% (${CNT} statements)" | |
| fi | |
| else | |
| echo "$m: report not found" | |
| fi | |
| done | |
| if [ "$TOTAL" -gt 0 ]; then | |
| PCT=$(awk "BEGIN { printf \"%.2f\", $COVERED * 100.0 / $TOTAL }") | |
| echo "Library statement coverage (combined): ${PCT}% (${COVERED}/${TOTAL})" | |
| fi |