perf(rendering): make rendering parallel #1505
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
| # This workflow will build the project with Gradle and release its build. | |
| name: Gradle test | |
| on: | |
| workflow_call: | |
| push: | |
| branches-ignore: [ "main", "workflow-test" ] | |
| pull_request: | |
| jobs: | |
| unit-test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| steps: | |
| - uses: iamgio/quarkdown/.github/actions/setup-environment@main | |
| if: matrix.os == 'ubuntu-latest' | |
| with: | |
| full-checkout: ${{ inputs.full-checkout }} | |
| - name: Checkout Repository (Windows) | |
| if: matrix.os == 'windows-latest' | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 (Windows) | |
| if: matrix.os == 'windows-latest' | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Setup Gradle (Windows) | |
| if: matrix.os == 'windows-latest' | |
| uses: gradle/actions/setup-gradle@v3 | |
| - name: Run tests | |
| uses: burrunan/gradle-cache-action@v3 | |
| with: | |
| job-id: unit-test-${{ matrix.os }} | |
| arguments: ${{ matrix.os == 'ubuntu-latest' && 'ktlintCheck test' || 'test' }} | |
| e2e-build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: iamgio/quarkdown/.github/actions/setup-environment@main | |
| with: | |
| full-checkout: ${{ inputs.full-checkout }} | |
| - name: Build CLI | |
| id: build | |
| uses: burrunan/gradle-cache-action@v3 | |
| with: | |
| job-id: e2e-build | |
| arguments: installDist | |
| # Building the wiki to ensure it compiles | |
| - name: Build wiki | |
| run: | | |
| cd docs | |
| ${{ github.workspace }}/build/install/quarkdown/bin/quarkdown c main.qd --strict --allow all --clean | |
| - name: Upload CLI artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: quarkdown-e2e-cli | |
| path: build/install/quarkdown | |
| retention-days: 1 | |
| e2e-test: | |
| runs-on: ubuntu-latest | |
| needs: e2e-build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| shard: [1, 2, 3, 4] | |
| steps: | |
| - uses: iamgio/quarkdown/.github/actions/setup-environment@main | |
| with: | |
| full-checkout: ${{ inputs.full-checkout }} | |
| - name: Download CLI artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: quarkdown-e2e-cli | |
| path: build/install/quarkdown | |
| - name: Make CLI executable | |
| run: chmod +x build/install/quarkdown/bin/quarkdown | |
| - name: Run E2E tests (shard ${{ matrix.shard }}/4) | |
| uses: burrunan/gradle-cache-action@v3 | |
| env: | |
| QUARKDOWN_CLI_PATH: ${{ github.workspace }}/build/install/quarkdown/bin/quarkdown | |
| with: | |
| job-id: e2e-test | |
| arguments: :quarkdown-html:e2eTest -Pshard=${{ matrix.shard }} -PtotalShards=4 |