Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable running E2E tests from streamlit/streamlit #72

Merged
merged 39 commits into from
Aug 31, 2023

Conversation

sfc-gh-gpijanski
Copy link
Contributor

@sfc-gh-gpijanski sfc-gh-gpijanski commented Aug 23, 2023

This change enables running e2e tests on all components from streamlit/streamlit repository. It extracts:

  • building components wheels
  • packing streamlit component library
  • running e2e tests

into a separate actions.

Separate building component wheels and streamlit component libraries and some fixes and refactor. Changes from
@sfc-gh-gpijanski sfc-gh-gpijanski changed the title Extract e2e tests steps to separate workflow Enable running E2E tests from streamlit/streamlit Aug 29, 2023
@sfc-gh-gpijanski sfc-gh-gpijanski marked this pull request as ready for review August 29, 2023 10:34
inputs:
custom_streamlit_component_lib_file:
required: false
description: ''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a description?

shell: bash
run: |
if [ -n "${{ inputs.streamlit_version }}" ]; then
./dev.py e2e-build-images "--streamlit-version=${{ inputs.streamlit_version }}" "--python-version=${{ inputs.python_version }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using inputs as variables in a script is potentially dangerous because we don't know how the user will use this action. See: https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable


- name: Check prerequisite
run: |
One and exactly one input is required: streamlit_version, streamlit_wheel_file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
One and exactly one input is required: streamlit_version, streamlit_wheel_file
echo "One and exactly one input is required: streamlit_version, streamlit_wheel_file".

inputs:
custom_streamlit_component_lib_file:
required: false
description: 'Streamlit Component Library package'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description: 'Streamlit Component Library package'
description: |
Path to local Streamlit Component Library package.
To generate a package, run the npm pack command in the directory with the Streamlit component library.


outputs:
output_directory:
description: ''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a description here also? Each description field should be filled in.

@@ -0,0 +1,54 @@
name: 'Build Streamlit Component Library'
Copy link
Contributor

@sfc-gh-kbregula sfc-gh-kbregula Aug 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not an unambiguous description in this context, because in the case of npm packages, building is the process of compiling Typescript code to Javascript, but we are packaging a library here.


inputs:
python_version:
description: 'Python version'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a more descriptive description?

@sfc-gh-gpijanski sfc-gh-gpijanski merged commit 6a95382 into master Aug 31, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants