-
Notifications
You must be signed in to change notification settings - Fork 46
68 lines (63 loc) · 2.14 KB
/
Copy pathe2e.yml
File metadata and controls
68 lines (63 loc) · 2.14 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
name: e2e
# E2E tests against real observability platforms (Axiom, PostHog, Sentry,
# Better Stack). They are NOT run on every PR because:
# - secrets are not exposed to fork PRs (security)
# - we don't want to spam the destinations on every push
# - they are slower than unit tests (real network, ingestion lag)
#
# Triggers:
# - daily cron (3:00 UTC) — daily health check
# - push to main — confirm a merge didn't break anything
# - workflow_dispatch — manual run from the Actions tab
# - PR labelled `e2e` — opt-in for adapter changes (only on PRs from
# the same repo, never on forks)
on:
schedule:
- cron: '0 3 * * *'
push:
branches:
- main
paths:
- 'packages/evlog/src/adapters/**'
- 'packages/evlog/src/shared/drain.ts'
- 'packages/evlog/src/shared/http.ts'
- 'packages/evlog/test/e2e/**'
- '.github/workflows/e2e.yml'
pull_request:
types: [labeled, synchronize, opened]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: e2e-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
e2e:
# Skip PRs that aren't labelled `e2e` (or skip fork PRs even if labelled).
if: |
github.event_name != 'pull_request' || (
contains(github.event.pull_request.labels.*.name, 'e2e')
&& github.event.pull_request.head.repo.full_name == github.repository
)
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Prepare
run: pnpm run dev:prepare
- name: Run e2e tests
run: pnpm run test:e2e
env:
AXIOM_TOKEN: ${{ secrets.AXIOM_TOKEN }}
AXIOM_DATASET: ${{ secrets.AXIOM_DATASET }}
AXIOM_ORG_ID: ${{ secrets.AXIOM_ORG_ID }}
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
BETTER_STACK_SOURCE_TOKEN: ${{ secrets.BETTER_STACK_SOURCE_TOKEN }}