-
Notifications
You must be signed in to change notification settings - Fork 0
129 lines (114 loc) · 4.9 KB
/
e2e.yml
File metadata and controls
129 lines (114 loc) · 4.9 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: e2e
on:
workflow_dispatch:
pull_request:
paths:
- "apps/gateway/**"
- "packages/models/**"
- "packages/shared/**"
- "**/*.e2e.ts"
- ".github/workflows/e2e.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
e2e-shards:
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository }}
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4, 5]
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Collect versions
run: |
echo "nodejs_version=$(cat .tool-versions | grep 'nodejs' | cut -d ' ' -f 2)" >> "$GITHUB_ENV"
echo "pnpm_version=$(cat .tool-versions | grep 'pnpm' | cut -d ' ' -f 2)" >> "$GITHUB_ENV"
- uses: pnpm/action-setup@v4
with:
version: ${{ env.pnpm_version }}
- uses: actions/setup-node@v6
with:
node-version: ${{ env.nodejs_version }}
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Setup and run e2e shard ${{ matrix.shard }}
run: |
set -eux
pnpm run setup
export DATABASE_URL=postgres://postgres:pw@localhost:5432/test
E2E_TEST=true pnpm vitest run -c vitest/vitest.e2e.config.mts --no-file-parallelism --shard=${{ matrix.shard }}/5 --reporter=blob --outputFile=e2e-results-${{ matrix.shard }}.blob || true
env:
LLM_OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
LLM_ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
LLM_INFERENCE_NET_API_KEY: ${{ secrets.INFERENCE_NET_API_KEY }}
LLM_TOGETHER_AI_API_KEY: ${{ secrets.TOGETHER_AI_API_KEY }}
LLM_GOOGLE_AI_STUDIO_API_KEY: ${{ secrets.GOOGLE_AI_STUDIO_API_KEY }}
LLM_GOOGLE_CLOUD_PROJECT: ${{ secrets.LLM_GOOGLE_CLOUD_PROJECT }}
LLM_GOOGLE_VERTEX_API_KEY: ${{ secrets.GOOGLE_VERTEX_API_KEY }}
LLM_CLOUD_RIFT_API_KEY: ${{ secrets.CLOUD_RIFT_API_KEY }}
LLM_MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
LLM_X_AI_API_KEY: ${{ secrets.X_AI_API_KEY }}
LLM_GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}
LLM_DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}
LLM_PERPLEXITY_API_KEY: ${{ secrets.PERPLEXITY_API_KEY }}
LLM_NOVITA_AI_API_KEY: ${{ secrets.NOVITA_AI_API_KEY }}
LLM_MOONSHOT_API_KEY: ${{ secrets.MOONSHOT_API_KEY }}
LLM_ALIBABA_API_KEY: ${{ secrets.ALIBABA_API_KEY }}
LLM_NEBIUS_API_KEY: ${{ secrets.NEBIUS_API_KEY }}
LLM_Z_AI_API_KEY: ${{ secrets.Z_AI_API_KEY }}
LLM_NANO_GPT_API_KEY: ${{ secrets.NANO_GPT_API_KEY }}
LLM_AWS_BEDROCK_API_KEY: ${{ secrets.AWS_BEDROCK_API_KEY }}
LLM_AZURE_API_KEY: ${{ secrets.AZURE_API_KEY }}
LLM_AZURE_RESOURCE: ${{ secrets.AZURE_RESOURCE }}
LLM_CANOPY_WAVE_API_KEY: ${{ secrets.CANOPY_WAVE_API_KEY }}
LLM_CEREBRAS_API_KEY: ${{ secrets.CEREBRAS_API_KEY }}
LLM_BYTEDANCE_API_KEY: ${{ secrets.LLM_BYTEDANCE_API_KEY }}
LLM_MINIMAX_API_KEY: ${{ secrets.LLM_MINIMAX_API_KEY }}
- name: Upload shard results
if: always()
uses: actions/upload-artifact@v6
with:
name: e2e-results-${{ matrix.shard }}
path: e2e-results-${{ matrix.shard }}.blob
retention-days: 1
if-no-files-found: ignore
e2e:
runs-on: ubuntu-latest
needs: e2e-shards
if: always() && github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Collect versions
run: |
echo "nodejs_version=$(cat .tool-versions | grep 'nodejs' | cut -d ' ' -f 2)" >> "$GITHUB_ENV"
echo "pnpm_version=$(cat .tool-versions | grep 'pnpm' | cut -d ' ' -f 2)" >> "$GITHUB_ENV"
- uses: pnpm/action-setup@v4
with:
version: ${{ env.pnpm_version }}
- uses: actions/setup-node@v6
with:
node-version: ${{ env.nodejs_version }}
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Download all shard results
uses: actions/download-artifact@v7
with:
path: ./e2e-results
pattern: e2e-results-*
- name: Merge reports and show final results
run: |
# Create .vitest-reports directory and move blob files there
mkdir -p .vitest-reports
find ./e2e-results -name "*.blob" -exec mv {} .vitest-reports/ \;
# Merge reports - this will fail if tests failed, providing the final status
pnpm vitest run -c vitest/vitest.e2e.config.mts --merge-reports