Skip to content

Commit 39f98c1

Browse files
Create .github/actions/run_e2e
1 parent a5e8eea commit 39f98c1

File tree

4 files changed

+42
-11
lines changed

4 files changed

+42
-11
lines changed

.github/actions/run_e2e/action.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: 'Hello World'
2+
description: 'Greet someone'
3+
inputs:
4+
python_version:
5+
required: true
6+
default: '3.8'
7+
streamlit_version:
8+
required: true
9+
default: '1.25.0'
10+
streamlit_path:
11+
default: ''
12+
13+
runs:
14+
using: "composite"
15+
steps:
16+
- run: export
17+
shell: bash
18+
19+
- run: echo "${GH_JSON}"
20+
shell: bash
21+
env:
22+
GH_JSON: ${{ toJson(github) }}
23+
24+
- name: Build docker images
25+
run: ./dev.py e2e-build-images "--streamlit-version=${{ env.STREAMLIT_VERSION }}" "--python-version=${{ env.PYTHON_VERSION }}"
26+
shell: bash
27+
env:
28+
STREAMLIT_VERSION: ${{ inputs.streamlit_version }}
29+
PYTHON_VERSION: ${{ inputs.python_version }}
30+
31+
- name: Run e2e tests
32+
run: ./dev.py e2e-run-tests "--streamlit-version=${{ env.STREAMLIT_VERSION }}" "--python-version=${{ env.PYTHON_VERSION }}"
33+
shell: bash
34+
env:
35+
STREAMLIT_VERSION: ${{ inputs.streamlit_version }}
36+
PYTHON_VERSION: ${{ inputs.python_version }}

.github/workflows/ci.yaml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,10 @@ jobs:
110110
path: dist/*.whl
111111
if-no-files-found: error
112112

113-
- name: Set up Docker Buildx
113+
- name: Run E2E tests
114114
if: matrix.node_version == '19.x'
115-
uses: docker/setup-buildx-action@7703e82fbced3d0c9eec08dff4429c023a5fd9a9 # v2.9.1
116-
117-
- name: Build docker images
118-
if: matrix.node_version == '19.x'
119-
run: ./dev.py e2e-build-images "--streamlit-version=${{ env.STREAMLIT_VERSION }}" "--python-version=${{ env.PYTHON_VERSION }}"
120-
121-
- name: Run e2e tests
122-
if: matrix.node_version == '19.x'
123-
run: ./dev.py e2e-run-tests "--streamlit-version=${{ env.STREAMLIT_VERSION }}" "--python-version=${{ env.PYTHON_VERSION }}"
115+
uses:
116+
./.github/actions/run_e2e
124117

125118
build-cookiecutter:
126119
runs-on: ubuntu-latest

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# syntax=docker/dockerfile:1.4
22

3-
ARG PYTHON_VERSION="3.11.4"
3+
ARG PYTHON_VERSION
44
FROM python:${PYTHON_VERSION}-slim-bullseye
55

66
SHELL ["/bin/bash", "-o", "pipefail", "-e", "-u", "-x", "-c"]

dev.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
THIS_DIRECTORY / "template",
2424
THIS_DIRECTORY / "template-reactless",
2525
]
26+
# TODO(kbregula): Enable tests for examples
27+
EXAMPLE_DIRECTORIES = []
2628

2729

2830
# Utilities function

0 commit comments

Comments
 (0)