add deploy workflow #879
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: unit-tests | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.id }} | |
cancel-in-progress: true | |
env: | |
OPENAI_API_KEY: dummy | |
TELEMETRY_ENABLED: false | |
REFLEX_DEP: "git+https://github.com/reflex-dev/reflex@main" | |
on: | |
push: | |
branches: ['main'] | |
pull_request: | |
branches: ['main'] | |
workflow_dispatch: | |
inputs: | |
reflex_dep: | |
description: "Reflex dependency (full specifier)" | |
permissions: | |
contents: read | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
unit-tests: | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ['3.11.5', '3.12.0'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Requirements for reflex-web and reflex | |
run: | | |
pip install '${{ github.event.inputs.reflex_dep || env.REFLEX_DEP }}' -r requirements.txt pytest playwright pytest-playwright | |
playwright install --with-deps | |
- name: Run unit tests | |
run: | | |
export PYTHONUNBUFFERED=1 | |
reflex init | |
pytest tests |