8
types: [opened, synchronize, reopened]
9
# Allows workflow to be called from other workflows
16
# Avoid duplicate workflows on same branch
18
group: ${{ github.workflow }}-${{ github.ref }}-javascript
19
cancel-in-progress: true
23
runs-on: ubuntu-latest
27
shell: bash --login -eo pipefail {0}
30
- name: Checkout Streamlit code
31
uses: actions/checkout@v4
33
ref: ${{ inputs.ref }}
34
persist-credentials: false
35
submodules: "recursive"
37
- name: Set Python version vars
38
uses: ./.github/actions/build_info
39
- name: Set up Python ${{ env.PYTHON_MAX_VERSION }}
40
uses: actions/setup-python@v5
42
python-version: "${{ env.PYTHON_MAX_VERSION }}"
43
- name: Setup virtual env
44
uses: ./.github/actions/make_init
45
- name: Run make develop
47
- name: Run make protobuf
49
- name: Run make frontend-lib
50
run: make frontend-lib
51
- name: Audit frontend licenses
52
run: ./scripts/audit_frontend_licenses.py
55
# Run eslint as a standalone command to generate the test report.
56
# We need to --hook-stage manual to trigger Typecheck too
57
PRE_COMMIT_NO_CONCURRENCY=true SKIP=eslint pre-commit run --hook-stage manual --show-diff-on-failure --color=always --all-files
58
# Run eslint using Makefile omitting the pre-commit
60
- name: Validate NOTICES
62
# Run `make notices`. If it results in changes, warn the user and fail.
65
git_status=$(git status --porcelain -- NOTICES)
66
if [[ -n $git_status ]]; then
67
echo "::error::The NOTICES file is out of date! Please run \`make notices\` and commit the result."
68
echo "::group::git diff NOTICES"
73
echo "NOTICES is up to date."
75
- name: Run frontend tests
79
runs-on: ubuntu-latest
83
shell: bash --login -eo pipefail {0}
86
- name: Checkout Streamlit code
87
uses: actions/checkout@v4
89
ref: ${{ inputs.ref }}
90
persist-credentials: false
91
submodules: "recursive"
94
uses: actions/setup-node@v4
98
cache-dependency-path: "component-lib/yarn.lock"
99
- name: Install node dependencies
100
working-directory: component-lib
102
- name: Run frontend tests
103
working-directory: component-lib
105
- name: Build package
106
working-directory: component-lib