Skip to content

Add some quick fixes for test flakiness #318

Add some quick fixes for test flakiness

Add some quick fixes for test flakiness #318

Workflow file for this run

name: CI
on:
push:
branches:
- "master"
pull_request:
branches:
- "master"
jobs:
build-examples-templates-and-run-dockerized-e2e-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node_version:
# For details, see: https://nodejs.dev/en/about/releases/
# Maintenance LTS. End Of Life: 2023-09-11
- 16.x
# Active LTS. End Of Life: 2025-04-30
- 18.x
# Current version
- 19.x
component_lib_version:
- current
- develop
streamlit_version:
- latest
- nightly
env:
NODE_VERSION: ${{ matrix.node_version }}
PYTHON_VERSION: 3.8 # Oldest version supported by Streamlit
STREAMLIT_VERSION: ${{ matrix.streamlit_version }}
COMPONENT_LIB_VERSION: ${{ matrix.component_lib_version }}
name: Examples + Templates / node_version=${{ matrix.node_version }} / streamlit_version=${{ matrix.streamlit_version }} / component_lib_version=${{ matrix.component_lib_version }}
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
path: component-template
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Check dependencies for examples
run: ./dev.py examples-check-deps
working-directory: ./component-template/
- name: Check e2e utils files
run: ./dev.py e2e-utils-check
working-directory: ./component-template/
- name: Pack Streamlit Component Library
uses: ./component-template/.github/actions/pack_streamlit_component_library
if: matrix.component_lib_version == 'develop'
id: streamlit_component_library
- name: Build components wheels
uses: ./component-template/.github/actions/build_component_wheels
id: component_wheels
with:
custom_streamlit_component_lib_file: >-
${{ matrix.component_lib_version == 'develop' && steps.streamlit_component_library.outputs.output_file || '' }}
- name: Upload wheel packages
uses: actions/upload-artifact@v3
with:
name: all-wheel
path: ${{ steps.component_wheels.outputs.output_directory }}/*.whl
if-no-files-found: error
- name: Run E2E tests
if: matrix.node_version == '19.x'
uses: ./component-template/.github/actions/run_e2e
with:
python_version: ${{ env.PYTHON_VERSION }}
streamlit_version: ${{ env.STREAMLIT_VERSION }}
build-cookiecutter:
runs-on: ubuntu-latest
name: Cookiecutter
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install cookiecutter
run: |
pip install pipx
# Cookiecutter 2.2.3 has broken replay file support used in our regression check.
# It should still works for end-user.
# See: https://github.com/cookiecutter/cookiecutter/issues/1900
pipx install 'cookiecutter==2.2.2'
- name: Checks that templates have been generated by cookiecutter and have no unwanted changes.
run: |
./dev.py templates-check-not-modified