Bump streamlit from 1.18.1 to 1.27.2 #466
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
streamlit-version: [null] | |
include: | |
# Test with streamlit <1.4.0 and >=1.4.0. See https://github.com/whitphx/streamlit-server-state/issues/64 | |
- python-version: 3.9 | |
streamlit-version: 1.0.0 | |
- python-version: 3.9 | |
streamlit-version: 1.4.0 | |
# Test with streamlit >=1.6.0. See https://github.com/whitphx/streamlit-webrtc/issues/709 | |
- python-version: 3.9 | |
streamlit-version: 1.6.0 | |
# Test with streamlit >=1.8.0. See https://github.com/whitphx/streamlit-webrtc/issues/759 | |
- python-version: 3.9 | |
streamlit-version: 1.8.0 | |
# Test with streamlit >=1.12.0. See https://github.com/whitphx/streamlit-server-state/issues/128 | |
- python-version: 3.9 | |
streamlit-version: 1.12.0 | |
# Test with streamlit >=1.12.1. See https://github.com/whitphx/streamlit-server-state/issues/135 | |
- python-version: 3.9 | |
streamlit-version: 1.12.1 | |
# Test with streamlit >=1.14.0. See https://github.com/whitphx/streamlit-server-state/pull/175 | |
- python-version: 3.9 | |
streamlit-version: 1.14.0 | |
# Test with streamlit >=1.18.0. See https://github.com/whitphx/streamlit-server-state/issues/171 | |
- python-version: 3.9 | |
streamlit-version: 1.18.0 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ matrix.python-version }} | |
# The following steps are based on https://github.com/python-poetry/poetry/blob/def1ee8f3ae00c307ca028da53d2347615c5c32b/.github/workflows/main.yml#L51-L84 | |
- name: Get full Python version | |
id: full-python-version | |
run: echo version=$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") >> $GITHUB_OUTPUT | |
- name: Bootstrap poetry | |
run: | | |
curl -sL https://install.python-poetry.org | python - -y | |
- name: Update PATH | |
run: echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Configure poetry | |
run: poetry config virtualenvs.in-project true | |
- name: Set up cache | |
uses: actions/cache@v3 | |
id: cache | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Ensure cache is healthy | |
if: steps.cache.outputs.cache-hit == 'true' | |
run: timeout 10s pip --version || rm -rf .venv | |
- name: Install a specific version of Streamlit | |
if: ${{ matrix.streamlit-version }} | |
run: | | |
poetry remove -D streamlit | |
poetry add -D streamlit=="${STREAMLIT_VERSION}" | |
env: | |
STREAMLIT_VERSION: ${{ matrix.streamlit-version }} | |
- name: Install dependencies | |
run: poetry install | |
- name: Show Python and Streamlit versions | |
run: | | |
python -V | |
poetry run streamlit version | |
- name: Lint with black, isort, and flake8 | |
run: | | |
poetry run black . --check | |
poetry run isort . --check | |
poetry run flake8 | |
- name: Type checking with mypy | |
run: | | |
poetry run mypy . | |
- name: Test with pytest | |
run: | | |
poetry run pytest |