Nightly #48
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: Nightly | |
| on: | |
| schedule: | |
| - cron: "0 2 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| issues: write | |
| jobs: | |
| verify-compose-modules: | |
| name: Verify Compose modules | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| token: ${{ github.token }} | |
| - name: Gradle cache | |
| uses: gradle/actions/setup-gradle@v5 | |
| - name: Run formatting and module builds | |
| run: ./gradlew --console=plain spotlessCheck :ui:build :ui:publishToMavenLocal :demo:build :preview:build :preview-insets:build :apps:social:build --no-daemon | |
| - name: Report scheduled failure | |
| if: failure() && github.event_name == 'schedule' | |
| uses: actions/github-script@v8 | |
| with: | |
| script: | | |
| const owner = context.repo.owner; | |
| const repo = context.repo.repo; | |
| const title = "Nightly workflow failure"; | |
| const runUrl = `https://github.com/${owner}/${repo}/actions/runs/${context.runId}`; | |
| const body = [ | |
| "The nightly workflow failed.", | |
| "", | |
| `- Workflow: ${context.workflow}`, | |
| `- Job: ${context.job}`, | |
| `- Run: ${runUrl}`, | |
| `- Commit: ${context.sha}`, | |
| `- Ref: ${context.ref}`, | |
| ].join("\n"); | |
| const { data: issues } = await github.rest.issues.listForRepo({ | |
| owner, | |
| repo, | |
| state: "open", | |
| per_page: 100, | |
| }); | |
| const existing = issues.find((issue) => issue.title === title); | |
| if (existing) { | |
| await github.rest.issues.createComment({ | |
| owner, | |
| repo, | |
| issue_number: existing.number, | |
| body, | |
| }); | |
| core.info(`Added failure comment to issue #${existing.number}`); | |
| } else { | |
| const created = await github.rest.issues.create({ | |
| owner, | |
| repo, | |
| title, | |
| body, | |
| }); | |
| core.info(`Created issue #${created.data.number}`); | |
| } | |
| verify-cli: | |
| name: Verify CLI on ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| gradle_command: ./gradlew | |
| - os: macos-latest | |
| gradle_command: ./gradlew | |
| - os: windows-latest | |
| gradle_command: .\gradlew.bat | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| token: ${{ github.token }} | |
| - name: Gradle cache | |
| uses: gradle/actions/setup-gradle@v5 | |
| - name: Run formatting, unit tests, and integration tests | |
| run: ${{ matrix.gradle_command }} --console=plain spotlessCheck :packages:cli:test :packages:cli:integrationTest --no-daemon | |
| - name: Check npm package | |
| run: ${{ matrix.gradle_command }} --console=plain :packages:cli:npmPackageCheck --no-daemon | |
| - name: Report scheduled failure | |
| if: failure() && github.event_name == 'schedule' | |
| uses: actions/github-script@v8 | |
| with: | |
| script: | | |
| const owner = context.repo.owner; | |
| const repo = context.repo.repo; | |
| const title = "Nightly workflow failure"; | |
| const runUrl = `https://github.com/${owner}/${repo}/actions/runs/${context.runId}`; | |
| const body = [ | |
| "The nightly workflow failed.", | |
| "", | |
| `- Workflow: ${context.workflow}`, | |
| `- Run: ${runUrl}`, | |
| `- Commit: ${context.sha}`, | |
| `- Ref: ${context.ref}`, | |
| ].join("\n"); | |
| const { data: issues } = await github.rest.issues.listForRepo({ | |
| owner, | |
| repo, | |
| state: "open", | |
| per_page: 100, | |
| }); | |
| const existing = issues.find((issue) => issue.title === title); | |
| if (existing) { | |
| await github.rest.issues.createComment({ | |
| owner, | |
| repo, | |
| issue_number: existing.number, | |
| body, | |
| }); | |
| core.info(`Added failure comment to issue #${existing.number}`); | |
| } else { | |
| const created = await github.rest.issues.create({ | |
| owner, | |
| repo, | |
| title, | |
| body, | |
| }); | |
| core.info(`Created issue #${created.data.number}`); | |
| } | |
| verify-release-readiness: | |
| name: Verify release readiness | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| token: ${{ github.token }} | |
| - name: Gradle cache | |
| uses: gradle/actions/setup-gradle@v5 | |
| - name: Install release tooling | |
| run: npm ci --ignore-scripts | |
| - name: Check release versions | |
| run: npm run release:check-versions | |
| - name: Check release plan | |
| run: npm run release:publish:dry-run | |
| - name: Report scheduled failure | |
| if: failure() && github.event_name == 'schedule' | |
| uses: actions/github-script@v8 | |
| with: | |
| script: | | |
| const owner = context.repo.owner; | |
| const repo = context.repo.repo; | |
| const title = "Nightly workflow failure"; | |
| const runUrl = `https://github.com/${owner}/${repo}/actions/runs/${context.runId}`; | |
| const body = [ | |
| "The nightly workflow failed.", | |
| "", | |
| `- Workflow: ${context.workflow}`, | |
| `- Job: ${context.job}`, | |
| `- Run: ${runUrl}`, | |
| `- Commit: ${context.sha}`, | |
| `- Ref: ${context.ref}`, | |
| ].join("\n"); | |
| const { data: issues } = await github.rest.issues.listForRepo({ | |
| owner, | |
| repo, | |
| state: "open", | |
| per_page: 100, | |
| }); | |
| const existing = issues.find((issue) => issue.title === title); | |
| if (existing) { | |
| await github.rest.issues.createComment({ | |
| owner, | |
| repo, | |
| issue_number: existing.number, | |
| body, | |
| }); | |
| core.info(`Added failure comment to issue #${existing.number}`); | |
| } else { | |
| const created = await github.rest.issues.create({ | |
| owner, | |
| repo, | |
| title, | |
| body, | |
| }); | |
| core.info(`Created issue #${created.data.number}`); | |
| } |