Skip to content

Commit fc1cd56

Browse files
authored
ci: run all PR and merge workflows on preview branch (#1023)
* ci: run all PR and merge workflows on preview branch Add preview to branch triggers for: build-and-test, lint, codeql, e2e-tests, e2e-tests-full, pr-tarball, pr-size, pr-title. Also fix hardcoded refs to main in e2e-tests-full checkout steps and schema-check diff base. * fix: address CI failures on preview branch - Fix 2 integ tests that assume agent-first create behavior: add --framework Strands to stay on agent path (dry-run, missing options) - Fix prettier formatting in 7 files - Remove internal plans/specs/evo docs from preview branch
1 parent 8c4d6eb commit fc1cd56

21 files changed

Lines changed: 57 additions & 3960 deletions

.github/workflows/build-and-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ name: Build and Test
22

33
on:
44
push:
5-
branches: ['main']
5+
branches: ['main', 'preview']
66
pull_request:
7-
branches: ['main']
7+
branches: ['main', 'preview']
88

99
permissions:
1010
contents: read
1111

1212
# Cancel in-progress runs for PRs; never cancel runs on main (merges should not abort each other)
1313
concurrency:
1414
group: ${{ github.workflow }}-${{ github.ref }}
15-
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
15+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/preview' }}
1616

1717
jobs:
1818
build:

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ name: CodeQL
22

33
on:
44
push:
5-
branches: ['main']
5+
branches: ['main', 'preview']
66
pull_request:
7-
branches: ['main']
7+
branches: ['main', 'preview']
88
pull_request_target:
9-
branches: ['main']
9+
branches: ['main', 'preview']
1010

1111
# Cancel in-progress runs for PRs; never cancel runs on main (merges should not abort each other)
1212
concurrency:
1313
group: ${{ github.workflow }}-${{ github.ref }}
14-
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
14+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/preview' }}
1515

1616
jobs:
1717
analyze:

.github/workflows/e2e-tests-full.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
schedule:
99
- cron: '0 14 * * 1' # Every Monday at 9 AM EST (14:00 UTC)
1010
push:
11-
branches: [main]
11+
branches: [main, preview]
1212

1313
concurrency:
1414
group: e2e-${{ github.event.pull_request.number || github.ref }}
@@ -30,7 +30,7 @@ jobs:
3030
steps:
3131
- uses: actions/checkout@v6
3232
with:
33-
ref: main
33+
ref: ${{ github.sha }}
3434
- uses: actions/setup-node@v6
3535
with:
3636
node-version: '20.x'
@@ -86,7 +86,7 @@ jobs:
8686
steps:
8787
- uses: actions/checkout@v6
8888
with:
89-
ref: ${{ github.event_name == 'workflow_dispatch' && github.ref || 'main' }}
89+
ref: ${{ github.sha }}
9090
- uses: actions/setup-node@v6
9191
with:
9292
node-version: '20.x'

.github/workflows/e2e-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
description: 'AWS region for deployment'
77
default: 'us-east-1'
88
pull_request_target:
9-
branches: [main]
9+
branches: [main, preview]
1010

1111
concurrency:
1212
group: e2e-${{ github.event.pull_request.number || github.ref }}

.github/workflows/lint.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ name: Quality and Safety Checks
22

33
on:
44
push:
5-
branches: ['main']
5+
branches: ['main', 'preview']
66
pull_request:
7-
branches: ['main']
7+
branches: ['main', 'preview']
88

99
permissions:
1010
contents: read
1111

1212
# Cancel in-progress runs for PRs; never cancel runs on main (merges should not abort each other)
1313
concurrency:
1414
group: ${{ github.workflow }}-${{ github.ref }}
15-
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
15+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/preview' }}
1616

1717
jobs:
1818
setup:
@@ -109,7 +109,7 @@ jobs:
109109
fetch-depth: 0
110110
- name: Reject schema changes outside release PRs
111111
run: |
112-
if git diff --name-only origin/main...HEAD | grep -q '^schemas/agentcore\.schema\.v[0-9]*\.json$'; then
112+
if git diff --name-only origin/${{ github.base_ref || github.ref_name }}...HEAD | grep -q '^schemas/agentcore\.schema\.v[0-9]*\.json$'; then
113113
echo ""
114114
echo "❌ schemas/ must not be modified directly."
115115
echo "The JSON schema is served live from the repo — changes are released automatically."

.github/workflows/pr-size.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: PR Size Check and Label
44
# Safe because this workflow only reads PR metadata — it never checks out untrusted code.
55
on:
66
pull_request_target:
7-
branches: [main]
7+
branches: [main, preview]
88

99
jobs:
1010
label-size:

.github/workflows/pr-tarball.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: PR Tarball
22
on:
33
pull_request_target:
4-
branches: [main]
4+
branches: [main, preview]
55

66
permissions:
77
contents: write

.github/workflows/pr-title.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Validate PR Title
22

33
on:
44
pull_request_target:
5-
branches: [main]
5+
branches: [main, preview]
66
types: [opened, edited, synchronize, reopened]
77

88
permissions:

0 commit comments

Comments
 (0)