Skip to content

Commit 1eeb802

Browse files
committed
chore: adjust CI to better serve external collaborators
1 parent 8b96a38 commit 1eeb802

File tree

3 files changed

+18
-11
lines changed

3 files changed

+18
-11
lines changed

.github/workflows/pkg-pr.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
jobs:
88
pkg-pr:
99
runs-on: ubuntu-latest
10-
1110
steps:
1211
- name: Checkout code
1312
uses: actions/checkout@v4
@@ -22,7 +21,7 @@ jobs:
2221

2322
- name: Build
2423
run: bun run --filter alchemy build
25-
24+
2625
# pkr.pr.new relies on pnpm-workspace.yaml for the `--pnpm` flag
2726
# which we need to resolve `catalog:` dependencies prior to publishing
2827
- name: Prepare Publish

.github/workflows/pr-preview.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ concurrency:
1111

1212
jobs:
1313
deploy-preview:
14-
if: ${{ github.event.action != 'closed' }}
14+
if: (github.event.action != 'closed' && github.event.pull_request.head.repo.full_name == github.repository)
1515
runs-on: ubuntu-latest
1616
permissions:
1717
id-token: write
@@ -54,7 +54,7 @@ jobs:
5454
PULL_REQUEST: ${{ github.event.pull_request.number }}
5555

5656
cleanup-preview:
57-
if: ${{ github.event.action == 'closed' }}
57+
if: (github.event.action == 'closed' && github.event.pull_request.head.repo.full_name == github.repository)
5858
runs-on: ubuntu-latest
5959
permissions:
6060
id-token: write

.github/workflows/test.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
# Ensure only one workflow runs at a time
1111
concurrency:
12-
group: "tests-${{ github.ref }}"
12+
group: "tests-${{ github.event.pull_request.number }}"
1313
cancel-in-progress: false
1414

1515
jobs:
@@ -30,17 +30,26 @@ jobs:
3030
with:
3131
node-version: "22"
3232

33-
- name: Setup Alchemy Environment
34-
uses: ./.github/actions/setup-alchemy
33+
- name: Setup Bun
34+
uses: oven-sh/setup-bun@v1
3535
with:
36-
aws-role-arn: ${{ secrets.AWS_ROLE_ARN }}
37-
aws-region: us-west-2
36+
bun-version: latest
37+
38+
- name: Install dependencies
39+
run: bun install
3840

3941
- name: Check Types and Lint
40-
run: |
42+
run: |
4143
bun run build
4244
bun run check
4345
46+
- name: Setup Alchemy Environment
47+
uses: ./.github/actions/setup-alchemy
48+
if: github.event_name != 'pull_request'
49+
with:
50+
aws-role-arn: ${{ secrets.AWS_ROLE_ARN }}
51+
aws-region: us-west-2
52+
4453
- name: Run tests
4554
if: github.event_name != 'pull_request'
4655
run: bun run test:fast
@@ -70,4 +79,3 @@ jobs:
7079
UPSTASH_API_KEY: ${{ env.UPSTASH_API_KEY }}
7180
UPSTASH_EMAIL: sam@alchemy.run
7281
VERCEL_ACCESS_TOKEN: ${{ env.VERCEL_ACCESS_TOKEN }}
73-

0 commit comments

Comments
 (0)