Skip to content

Use initial_value for computed var dependencies when building the initial state dict #18282

Use initial_value for computed var dependencies when building the initial state dict

Use initial_value for computed var dependencies when building the initial state dict #18282

name: reflex-init-in-docker-test
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.id || github.sha }}
cancel-in-progress: true
on:
push:
branches: ["main"]
paths-ignore:
- "**/*.md"
pull_request:
branches: ["main"]
jobs:
# This filter cannot live on the pull_request trigger: a workflow that a path
# filter skips never reports its checks at all, so a branch rule requiring
# them blocks the merge forever. Filtered out here, the jobs below skip
# instead, and a skipped job reports as a pass.
changes:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
run: ${{ steps.filter.outputs.changed }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: ./.github/actions/changed_paths
id: filter
with:
paths-ignore: |
**/*.md
# TODO we can extend to various starting points (e.g. Ubuntu with node, without node, with unzip, without unzip, etc.)
# Currently starting point is: Ubuntu + unzip, xz-utils, Python suite. No node.
reflex-install-and-init:
needs: changes
if: needs.changes.outputs.run == 'true'
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-tags: true
fetch-depth: 0
persist-credentials: false
- shell: bash
run: |
# Run reflex init in a docker container
# cwd is repo root
docker build -f tests/integration/init-test/Dockerfile -t reflex-init-test tests/integration/init-test
docker run --rm -v "$(pwd):/reflex-repo" reflex-init-test /reflex-repo/tests/integration/init-test/in_docker_test_script.sh
# The one status check the branch rules require from this workflow. Naming the
# jobs above directly does not survive: check names follow the matrix and the
# display names, and a job that a filter skips must not block the merge.
reflex-init-in-docker-test-gate:
needs: [changes, reflex-install-and-init]
if: always()
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: ./.github/actions/ci_gate
with:
needs: ${{ toJSON(needs) }}