-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (62 loc) · 1.99 KB
/
Copy pathconformance.yml
File metadata and controls
74 lines (62 loc) · 1.99 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
name: conformance
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
conformance:
name: Reference operator + conformance suite
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: Sync operator deps
working-directory: examples/local-operator
run: uv sync --frozen
- name: Sync conformance deps
working-directory: tests/conformance
run: uv sync --frozen
- name: Start reference operator
working-directory: examples/local-operator
run: |
nohup uv run python -m asmtp_operator --seed seed.json > operator.log 2>&1 &
echo $! > operator.pid
- name: Wait for operator to be reachable
run: |
for i in $(seq 1 30); do
if curl -sf http://127.0.0.1:8080/openapi.json > /dev/null; then
echo "operator up after ${i}s"
exit 0
fi
sleep 1
done
echo "operator failed to start"
cat examples/local-operator/operator.log
exit 1
- name: Run conformance suite
working-directory: tests/conformance
env:
ASMTP_OPERATOR_URL: http://127.0.0.1:8080
ASMTP_TEST_AGENTS: '{"@alice.test":"alice-token","@bob.test":"bob-token","@carol.test":"carol-token"}'
run: uv run pytest -v
- name: Stop reference operator
if: always()
working-directory: examples/local-operator
run: |
if [ -f operator.pid ]; then
kill "$(cat operator.pid)" 2>/dev/null || true
fi
- name: Upload operator log on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: operator-log
path: examples/local-operator/operator.log