Repository navigation
65 lines (55 loc) · 1.93 KB
/
Copy pathe2e.yml
File metadata and controls
65 lines (55 loc) · 1.93 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
# SPDX-License-Identifier: Apache-2.0
# Runs the E2E suite against the published gateway of a core version, started
# from core's deploy/docker files (scripts/e2e/start-gateway.sh). Sandboxes
# run the image from tests/e2e/Dockerfile.workload, which has the same Python
# as the client, so exec_python can unpickle what the client pickled.
name: e2e
on:
workflow_call:
inputs:
core-version:
description: Core version (default the pin, OPENSHELL_CORE_REF in mise.toml)
type: string
default: ""
workflow_dispatch:
inputs:
core-version:
description: Core version, for example v0.1.7 (default the pin, OPENSHELL_CORE_REF in mise.toml)
type: string
default: ""
permissions:
contents: read
jobs:
e2e:
name: e2e
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: jdx/mise-action@f5be966e4a917d54244728e6a5fdcd1d93a35e6c # v5.2.6
- name: Build the sandbox image
run: mise run e2e:image
- name: Start the gateway
env:
CORE_VERSION: ${{ inputs.core-version }}
run: |
set -euo pipefail
version=${CORE_VERSION:-$(mise run -q core:version)}
echo "Core version: $version" >>"$GITHUB_STEP_SUMMARY"
scripts/e2e/start-gateway.sh "$version" --default-image openshell/e2e-python:dev
- name: Run the E2E suite
env:
OPENSHELL_GATEWAY: e2e
run: mise run e2e
- name: Stop the gateway
if: always()
run: scripts/e2e/stop-gateway.sh
- name: Upload the gateway log
if: failure()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: gateway-log
path: ${{ runner.temp }}/openshell-e2e/gateway.log
if-no-files-found: ignore