Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
marker: 'integration'
pytest-params: "--json-report --json-report-file=.report.json"
notify-on-failure: true
# The provider keys and the Slack webhook live in this environment.
environment: integration
# A schedule only fires on the default branch, so it tests accelerate, where the
# work happens; Run workflow on any other branch tests that branch.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Should fix] R1.5 "Run workflow on any other branch tests that branch" stops being true once step 1 sets rules on integration: a dispatch from a branch outside main/accelerate is refused before it reaches a runner. The PR body says so itself. Change the comment to say that only main and accelerate can run it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 318ce01: the comment now says only main and accelerate can run this workflow, and that the environment's branch rules refuse Run workflow on any other branch. The main PR (#2020) carries the same wording.

ref: ${{ github.ref_name == github.event.repository.default_branch && 'accelerate' || '' }}
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ name: Integration (router)
# internal/searchrouter and internal/simulation are Postgres suites left out of the matrix too
# (simulation also needs an OpenAI key). imagerouter and dlc are left out of the matrix: AI-2040.
# mem0 is the exception: whose memories a session reads is decided by mem0's own filters, so
# the jobs marked `mem0` run its live suites with the MEM0_API_KEY secret, and skip them on a
# fork's pull request, which is given no secrets.
# the jobs marked `mem0` run its live suites with the MEM0_API_KEY secret on a push, and skip them
# on a pull request, which is given no secrets.
on:
push:
branches: [ "main", "accelerate" ]
Expand Down Expand Up @@ -37,6 +37,8 @@ jobs:
integration:
name: integration (${{ matrix.package }})
runs-on: ubuntu-latest
# MEM0_API_KEY lives in this environment, which a pull request's code never enters.
environment: ${{ github.event_name == 'push' && matrix.mem0 && 'integration' || '' }}
timeout-minutes: 40
strategy:
fail-fast: false
Expand Down Expand Up @@ -157,6 +159,6 @@ jobs:
env:
GOEXPERIMENT: simd
SKIP: ${{ matrix.skip }}
MEM0_API_KEY: ${{ matrix.mem0 && secrets.MEM0_API_KEY || '' }}
RUN_MEM0_SUITE: ${{ matrix.mem0 && secrets.MEM0_API_KEY != '' && '1' || '' }}
MEM0_API_KEY: ${{ github.event_name == 'push' && matrix.mem0 && secrets.MEM0_API_KEY || '' }}
RUN_MEM0_SUITE: ${{ github.event_name == 'push' && matrix.mem0 && secrets.MEM0_API_KEY != '' && '1' || '' }}
working-directory: acceleration
4 changes: 4 additions & 0 deletions .github/workflows/publish-sdk-kotlin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ jobs:
needs: version
if: github.event_name == 'push' && needs.version.outputs.channel != 'none'
runs-on: ubuntu-latest
# The signing key lives in this environment, which only the publishing branches may enter.
environment: release
defaults:
run:
working-directory: sdks/kotlin
Expand Down Expand Up @@ -153,6 +155,8 @@ jobs:
name: Upload to the Stream repository
needs: [ version, publish ]
runs-on: ubuntu-latest
# The repository endpoint and bucket live in this environment, as the signing key does.
environment: release
permissions:
contents: write # the sdk-kotlin-v* tag of a release
steps:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
uses: ./.github/workflows/run_tests.yml
with:
marker: 'integration'
# The provider keys live in this environment.
environment: integration
secrets: inherit

build-core:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ on:
required: false
default: ""
type: string
environment:
description: 'Environment the test job runs in, for its provider keys; empty runs it in none'
required: false
default: ""
type: string
concurrency:
group: ${{ github.workflow }}-${{ inputs.marker }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
Expand Down Expand Up @@ -84,6 +89,8 @@ jobs:
test:
name: Test "${{ inputs.marker }}"
runs-on: ubuntu-latest
# The provider keys live in this environment, which only the branches that need them may enter.
environment: ${{ inputs.environment }}
env:
ASSEMBLYAI_API_KEY: ${{ secrets.ASSEMBLYAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
Expand Down
Loading