ci: auto-generate stubs during test run #3
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: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| pull_request: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: Download Fixtures And Run Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Java 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "21" | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| with: | |
| gradle-version: "8.12.1" | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Sync addon source repos | |
| run: python tools/download_latest_release_jars.py --update | |
| - name: Download latest release fixture jars | |
| run: gradle downloadLatestReleaseJars --no-daemon | |
| - name: Run test suite | |
| run: gradle test --no-daemon -PautoGenerateStubs | |
| - name: Upload release summaries | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-summaries | |
| if-no-files-found: warn | |
| path: | | |
| ai_reference/addons/clone-summary.json | |
| fixtures/addons/jars/release-summary.json | |
| fixtures/addons/jars/release-summary.csv | |
| fixtures/addons/jars/release-summary.txt | |
| - name: Upload test reports | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-reports | |
| if-no-files-found: warn | |
| path: | | |
| build/reports/tests/test/** | |
| build/test-results/test/** |