-
Notifications
You must be signed in to change notification settings - Fork 13
106 lines (90 loc) · 3.07 KB
/
Copy pathe2e-attachments.yml
File metadata and controls
106 lines (90 loc) · 3.07 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
# E2E attachment-sync harness (skeleton).
#
# Intentionally runs on `workflow_dispatch` ONLY. The jobs below stand
# up the Compose rig and the language runtimes the eventual tests will
# need, then exit 0. They pin the shape of the CI integration so that
# wiring in real tests is a drop-in change.
#
# See e2e/README.md for the three-layer test design.
name: E2E — attachments
on:
workflow_dispatch:
# When the layer 1 contract tests land, enable this:
# pull_request:
# paths:
# - 'synkronus/**'
# - 'synkronus-cli/**'
# - 'e2e/**'
# - '.github/workflows/e2e-attachments.yml'
permissions:
contents: read
concurrency:
group: e2e-attachments-${{ github.ref }}
cancel-in-progress: true
jobs:
contract:
name: Layer 1 — Synkronus contract
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Set up Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version-file: synkronus/go.mod
cache: true
- name: Start Compose (postgres + synkronus)
run: |
docker compose \
-f docker-compose.yml \
-f e2e/docker-compose.e2e.yml \
--profile e2e up --build --wait
- name: Smoke — /health responds
env:
SYNKRONUS_HOST_PORT: 18080
run: |
curl --fail --retry 10 --retry-delay 2 --retry-connrefused \
"http://127.0.0.1:${SYNKRONUS_HOST_PORT}/health"
# TODO: replace with `go test ./e2e/contracts/... -tags=e2e` once
# the contract package lands.
- name: Contract tests (placeholder)
run: echo "No contract tests wired yet — see e2e/README.md"
- name: Tear down Compose
if: always()
run: |
docker compose \
-f docker-compose.yml \
-f e2e/docker-compose.e2e.yml \
--profile e2e down -v
headless:
name: Layer 2 — Formulus headless
runs-on: ubuntu-latest
timeout-minutes: 20
needs: contract
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Setup pnpm
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
with:
version: 10.33.2
- name: Set up Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 20
- name: Start Compose (postgres + synkronus)
run: |
docker compose \
-f docker-compose.yml \
-f e2e/docker-compose.e2e.yml \
--profile e2e up --build --wait
# TODO: replace with `pnpm --dir e2e/headless test` once the
# headless harness lands.
- name: Headless tests (placeholder)
run: echo "No headless tests wired yet — see e2e/README.md"
- name: Tear down Compose
if: always()
run: |
docker compose \
-f docker-compose.yml \
-f e2e/docker-compose.e2e.yml \
--profile e2e down -v