-
Notifications
You must be signed in to change notification settings - Fork 229
106 lines (88 loc) · 3.29 KB
/
ci.yaml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
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@v4
with:
name: all-wheel-${{ matrix.node_version }}-${{ matrix.component_lib_version }}-${{ matrix.streamlit_version }}
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