From f2c1d568998b71762fa438e54335ff6c606ae53e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Bregu=C5=82a?= Date: Fri, 25 Aug 2023 22:37:12 +0200 Subject: [PATCH] Create .github/actions/run_e2e --- .github/actions/run_e2e/action.yaml | 36 +++++++++++++++++++++++++++++ .github/workflows/ci.yaml | 13 +++-------- 2 files changed, 39 insertions(+), 10 deletions(-) create mode 100644 .github/actions/run_e2e/action.yaml diff --git a/.github/actions/run_e2e/action.yaml b/.github/actions/run_e2e/action.yaml new file mode 100644 index 00000000..557d73ae --- /dev/null +++ b/.github/actions/run_e2e/action.yaml @@ -0,0 +1,36 @@ +name: 'Hello World' +description: 'Greet someone' +inputs: + python_version: + required: true + default: 'World' + streamlit_version: + required: true + default: '1.25.0' + streamlit_path: + default: 'World' + +runs: + using: "composite" + steps: + - run: export + shell: bash + + - run: echo "${GH_JSON}" + shell: bash + env: + GH_JSON: ${{ toJson(github) }} + + - name: Build docker images + run: ./dev.py e2e-build-images "--streamlit-version=${{ env.STREAMLIT_VERSION }}" "--python-version=${{ env.PYTHON_VERSION }}" + shell: bash + env: + STREAMLIT_VERSION: ${{ inputs.streamlit_version }} + PYTHON_VERSION: ${{ inputs.python_version }} + + - name: Run e2e tests + run: ./dev.py e2e-run-tests "--streamlit-version=${{ env.STREAMLIT_VERSION }}" "--python-version=${{ env.PYTHON_VERSION }}" + shell: bash + env: + STREAMLIT_VERSION: ${{ inputs.streamlit_version }} + PYTHON_VERSION: ${{ inputs.python_version }} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4931eab0..dbc44380 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -110,17 +110,10 @@ jobs: path: dist/*.whl if-no-files-found: error - - name: Set up Docker Buildx + - name: Run E2E tests if: matrix.node_version == '19.x' - uses: docker/setup-buildx-action@7703e82fbced3d0c9eec08dff4429c023a5fd9a9 # v2.9.1 - - - name: Build docker images - if: matrix.node_version == '19.x' - run: ./dev.py e2e-build-images "--streamlit-version=${{ env.STREAMLIT_VERSION }}" "--python-version=${{ env.PYTHON_VERSION }}" - - - name: Run e2e tests - if: matrix.node_version == '19.x' - run: ./dev.py e2e-run-tests "--streamlit-version=${{ env.STREAMLIT_VERSION }}" "--python-version=${{ env.PYTHON_VERSION }}" + uses: + ./.github/actions/run_e2e build-cookiecutter: runs-on: ubuntu-latest