-
Notifications
You must be signed in to change notification settings - Fork 83
129 lines (108 loc) · 3.5 KB
/
framework-tests.yaml
File metadata and controls
129 lines (108 loc) · 3.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: Framework Integration Tests
on:
pull_request:
types: [opened, synchronize, reopened, labeled]
workflow_dispatch:
inputs:
force-all:
description: 'Run all framework tests regardless of changes'
type: boolean
default: false
permissions:
contents: read
jobs:
detect-integrations:
name: Detect Changed Integrations
runs-on: ubuntu-latest
permissions: {}
outputs:
any-changed: ${{ steps.detect.outputs.any-changed }}
integrations: ${{ steps.detect.outputs.integrations }}
steps:
- uses: actions/checkout@v6
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Detect changed integrations
id: detect
run: |
ARGS=""
if [[ "${{ github.event.inputs.force-all }}" == "true" ]] || [[ "${{ contains(github.event.pull_request.labels.*.name, 'framework-tests') }}" == "true" ]]; then
ARGS="--all"
elif [[ "${{ github.head_ref }}" == "changeset-release/main" ]]; then
ARGS="--release-pr"
fi
bun run scripts/detect-changed-integrations.ts $ARGS
build:
name: Build Libraries
needs: detect-integrations
if: needs.detect-integrations.outputs.any-changed == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Cache bun dependencies
uses: actions/cache@v5
with:
path: ~/.bun/install/cache
key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }}
restore-keys: |
bun-${{ runner.os }}-
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '24.x'
- name: Install dependencies
run: bun install
- name: Enable turborepo build cache
uses: rharkor/caching-for-turbo@v2.3.11
- name: Build libraries
run: bun run build:libs
- name: Upload built repo for framework tests
uses: actions/upload-artifact@v7
with:
name: built-repo
path: |
packages/*/dist/
packages/integrations/*/dist/
retention-days: 1
test:
name: Framework Tests (${{ matrix.integration }})
needs: [detect-integrations, build]
if: needs.detect-integrations.outputs.any-changed == 'true'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
integration: ${{ fromJson(needs.detect-integrations.outputs.integrations) }}
steps:
- uses: actions/checkout@v6
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Cache bun dependencies
uses: actions/cache@v5
with:
path: ~/.bun/install/cache
key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }}
restore-keys: |
bun-${{ runner.os }}-
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '24.x'
- name: Setup pnpm
uses: pnpm/action-setup@v5
with:
version: 10
- name: Install dependencies
run: bun install
- name: Download built libraries
uses: actions/download-artifact@v8
with:
name: built-repo
path: packages/
- name: Run ${{ matrix.integration }} framework tests
run: cd framework-tests && bun install && bun run test -- --reporter=verbose frameworks/${{ matrix.integration }}/
timeout-minutes: 15
# env:
# FRAMEWORK_TEST_VERBOSE: '1'