reflex/.github/workflows/lighthouse.yml
Alek Petuskey 864a66b20d
Lighthouse Test CI (#1974)
* Initital lighhouse test

* Added seperate lighthouse test

* Added sh

* Added Project dir to bash

* Change proj path sh

* Temp public storage

* Add port check to lighthouse

* Refactor Check

* Refactor Sh

* Change ENV to prod

* Change ENV to prod

* Check port

* Check port

* Change because it doesn't auto detect hmtl

* Change to SPA

* Change to SPA

* HTTPs to HTTP

* Added extra routes

* Add posthog

* Temp save to file for large uploads

* Add distinctid

* Add distinctid to outlevel

---------

Co-authored-by: Alek Petuskey <alekpetuskey@aleks-mbp.lan>
2023-10-16 18:10:49 -07:00

69 lines
1.7 KiB
YAML

name: lighthouse-tests
on:
push:
branches: [ main ]
paths-ignore:
- '**/*.md'
pull_request:
branches: [ main ]
paths-ignore:
- '**/*.md'
permissions:
contents: read
defaults:
run:
shell: bash
env:
PYTHONIOENCODING: "utf8"
TELEMETRY_ENABLED: false
NODE_OPTIONS: "--max_old_space_size=4096"
jobs:
reflex-web:
strategy:
fail-fast: false
matrix:
# Show OS combos first in GUI
os: [ ubuntu-latest]
python-version: [ "3.11.4" ]
node-version: [ "16.x" ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- uses: ./.github/actions/setup_build_env
with:
python-version: ${{ matrix.python-version }}
run-poetry-install: true
create-venv-at-path: .venv
- name: Clone Reflex Website Repo
uses: actions/checkout@v4
with:
repository: reflex-dev/reflex-web
ref: reflex-ci
path: reflex-web
- name: Install Requirements for reflex-web
working-directory: ./reflex-web
run: poetry run pip install -r requirements.txt
- name: Init Website for reflex-web
working-directory: ./reflex-web
run: poetry run reflex init
- name: Install LightHouse Pre-reqs / Run LightHouse
run: |
# Check that npm is home
npm -v
poetry run bash scripts/lighthouse.sh ./reflex-web prod
env:
LHCI_GITHUB_APP_TOKEN: $
POSTHOG: $