-
Notifications
You must be signed in to change notification settings - Fork 14
ci: gate PRs on unit tests only and move integration to a daily run #292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
23aa9b3
ci: gate PRs on unit tests only and move integration to a daily run
mogita 035502c
ci: split the integration lane into its own workflow and harden the gate
mogita cd27a4a
test: mark every live-app test integration so the PR lane runs offline
mogita 6d45c77
docs: cut the commentary back to what is not obvious from the code
mogita File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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 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 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| name: _run-integration | ||
| on: | ||
| workflow_call: | ||
| secrets: { } | ||
|
|
||
| # A constant, not `github.workflow`, which inside a reusable workflow resolves to the | ||
| # caller's name: the daily run and the pre-tag run would land in separate lanes and hit the | ||
| # shared app at once. Queue rather than cancel, so the schedule cannot kill a release gate. | ||
| concurrency: | ||
| group: run-integration-${{ github.ref }} | ||
| cancel-in-progress: false | ||
|
|
||
| env: | ||
| UV_FROZEN: "1" | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| # The only place `-m integration` runs: daily and before a tag, never as a status check on a | ||
| # pull request. See DEVELOPMENT.md for why it gates nothing. | ||
| jobs: | ||
| integration-non-video: | ||
| name: 🧪 Non-video integration (${{ matrix.python-version }}) | ||
| environment: | ||
| name: ci | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | ||
| timeout-minutes: 30 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| - name: Install dependencies | ||
| uses: ./.github/actions/python-uv-setup | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Run integration tests | ||
| env: | ||
| STREAM_API_KEY: ${{ vars.STREAM_CHAT_API_KEY }} | ||
| STREAM_API_SECRET: ${{ secrets.STREAM_CHAT_API_SECRET }} | ||
| STREAM_BASE_URL: ${{ vars.STREAM_CHAT_BASE_URL }} | ||
| run: make test MARKER="integration" | ||
|
|
||
| integration-video: | ||
| name: 🧪 Video integration (${{ matrix.python-version }}) | ||
| environment: | ||
| name: ci | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | ||
| timeout-minutes: 30 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| - name: Install dependencies | ||
| uses: ./.github/actions/python-uv-setup | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Run integration tests | ||
| env: | ||
| STREAM_API_KEY: ${{ vars.STREAM_API_KEY }} | ||
| STREAM_API_SECRET: ${{ secrets.STREAM_API_SECRET }} | ||
| STREAM_BASE_URL: ${{ vars.STREAM_BASE_URL }} | ||
| run: make test-video MARKER="integration" |
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 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| name: Scheduled tests | ||
| # The integration lane's home. Advisory: see DEVELOPMENT.md. | ||
| on: | ||
| schedule: | ||
| - cron: "0 9 * * *" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| integration: | ||
|
mogita marked this conversation as resolved.
|
||
| uses: ./.github/workflows/run_integration.yml | ||
| secrets: inherit | ||
|
|
||
| # A failure here lands on no PR, and GitHub emails it only to whoever last edited the cron. | ||
| report: | ||
| name: Report a red run | ||
| needs: integration | ||
| if: failure() | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| issues: write | ||
| steps: | ||
| - name: Open or update the tracking issue | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| TITLE: Daily integration run is red | ||
| RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
| run: | | ||
| num="$(gh issue list --repo "$GITHUB_REPOSITORY" --state open --search "in:title \"$TITLE\"" \ | ||
| --json number,title --jq "map(select(.title == \"$TITLE\")) | .[0].number // empty")" | ||
| if [ -n "$num" ]; then | ||
| gh issue comment "$num" --repo "$GITHUB_REPOSITORY" --body "Still red: $RUN_URL" | ||
| else | ||
| gh issue create --repo "$GITHUB_REPOSITORY" --title "$TITLE" --body \ | ||
| "The daily \`-m integration\` run failed: $RUN_URL | ||
|
|
||
| Integration is advisory, so nothing is blocked by this. It still has to be read: the suite | ||
| runs against a live Stream app shared by five SDK repos, so decide whether this is the app, | ||
| the backend, or this SDK, and close the issue once a daily run is green again." | ||
| fi | ||
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 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 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 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 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.