-
Notifications
You must be signed in to change notification settings - Fork 632
87 lines (76 loc) · 2.96 KB
/
Copy pathci-test-e2e.yaml
File metadata and controls
87 lines (76 loc) · 2.96 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
name: Run e2e tests (rig + docker compose)
# Image-build wiring is not yet in place: the base docker/docker-compose.yaml
# references ${VERSION} for ~15 services without a default, and this workflow
# does not build/pull images or export VERSION/UNSTRACT_TEST_VERSION. Running
# the compose lane on push:main + nightly would fail deterministically (empty-
# tag image refs) before any test executes. Restore the `push: main` and
# `schedule:` triggers once a build step that exports the SHA tag lands.
on:
pull_request:
types: [labeled, synchronize]
branches: [main]
workflow_dispatch:
jobs:
e2e:
# Only run on PRs that opt in via the `run-e2e` label, plus manual dispatch.
if: >
github.event_name != 'pull_request' ||
contains(github.event.pull_request.labels.*.name, 'run-e2e')
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
with:
version: "0.6.14"
python-version: 3.12.9
- name: Install tox with UV
run: uv tool install tox --with tox-uv
- name: Validate test manifests
run: tox -e rig -- validate
- name: Restore main-branch test baseline
# See ci-test.yaml for the rationale on namespacing per-workflow.
uses: actions/cache@v5
with:
path: reports/previous-summary.json
key: unstract-test-baseline-e2e-main-${{ github.run_id }}
restore-keys: |
unstract-test-baseline-e2e-main-
unstract-test-baseline-e2e-
- name: Run e2e tier via docker compose
env:
UNSTRACT_E2E_RUNTIME: compose
run: |
# Use --tier e2e (not `all`) so this workflow runs only e2e groups.
# The main-branch baseline-update path is preserved for the eventual
# `workflow_dispatch` from main and future restoration of push: main.
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
tox -e e2e -- --fail-on-critical-gap --update-baseline
else
tox -e e2e
fi
- name: Capture docker compose logs on failure
if: failure()
run: |
mkdir -p reports
docker compose -p unstract-test \
-f docker/docker-compose.yaml \
-f tests/compose/docker-compose.test.yaml \
logs --no-color > reports/docker-compose-logs.txt || true
- name: Output e2e report to job summary
if: always() && hashFiles('reports/summary.md') != ''
shell: bash
run: |
cat reports/summary.md >> $GITHUB_STEP_SUMMARY
- name: Upload e2e reports artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: test-reports-e2e
path: reports/
if-no-files-found: ignore
retention-days: 30