Refactor: Replace TailwindFX.apply with TwStyle.apply across project #738
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: Java CI with Maven | |
| on: | |
| push: | |
| branches: [ "main", "develop" ] | |
| pull_request: | |
| branches: [ "main", "develop" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Install xvfb | |
| run: sudo apt-get update && sudo apt-get install -y xvfb | |
| - name: Build with Maven | |
| run: mvn -B package --file pom.xml | |
| - name: Run tests with headless JavaFX | |
| run: xvfb-run -a mvn test -Dtestfx.headless=true -Dtestfx.robot=glass -Dtestfx.setup.timeout=2500 -Dglass.platform=monocle -Dmonocle.platform=headless | |
| - name: Generate test report | |
| run: mvn surefire-report:report | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: test-results | |
| path: target/surefire-reports/ | |
| - name: Parse test results and create badge data | |
| id: badge_data | |
| run: | | |
| PASSED=$(grep -o 'Tests run: [0-9]*' target/surefire-reports/*.txt 2>/dev/null | head -1 | grep -o '[0-9]*' || echo "0") | |
| echo "PASSED=$PASSED" >> $GITHUB_OUTPUT | |
| cat > badge-data.json << EOF | |
| { | |
| "schemaVersion": 1, | |
| "label": "tests", | |
| "message": "${PASSED} passing", | |
| "color": "brightgreen" | |
| } | |
| EOF | |
| - name: Update GitHub Gist with test results | |
| run: | | |
| GIST_ID="${{ secrets.GIST_BADGE_ID }}" | |
| if [ -z "$GIST_ID" ]; then | |
| echo "Creating new gist..." | |
| RESPONSE=$(curl -s -X POST \ | |
| -H "Authorization: token ${{ secrets.GIST_TOKEN }}" \ | |
| -H "Accept: application/vnd.github.v3+json" \ | |
| https://api.github.com/gists \ | |
| -d @badge-data.json) | |
| GIST_ID=$(echo $RESPONSE | jq -r '.id') | |
| echo "Created gist with ID: $GIST_ID" | |
| echo "GIST_BADGE_ID=$GIST_ID" >> $GITHUB_ENV | |
| else | |
| echo "Updating existing gist..." | |
| # Update the gist file directly with the JSON content | |
| curl -s -X PATCH \ | |
| -H "Authorization: token ${{ secrets.GIST_TOKEN }}" \ | |
| -H "Accept: application/vnd.github.v3+json" \ | |
| https://api.github.com/gists/$GIST_ID \ | |
| -d @badge-data.json | |
| echo "Updated gist: $GIST_ID" | |
| fi | |
| echo "Badge URL: https://gist.githubusercontent.com/${{ github.repository_owner }}/$GIST_ID/raw/test-results.json" |