feat(site): add audio.cpp deployment path #13
This file contains hidden or 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: Product site | |
| on: | |
| pull_request: | |
| paths: | |
| - 'web-pages/product-site/**' | |
| - 'web-pages/scripts/**' | |
| - 'web-pages/nginx/**' | |
| - '.github/workflows/product-site.yml' | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'web-pages/product-site/**' | |
| - 'web-pages/scripts/**' | |
| - 'web-pages/nginx/**' | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-and-validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: pip | |
| cache-dependency-path: web-pages/product-site/requirements-site.txt | |
| - name: Install site dependencies | |
| run: python -m pip install -r web-pages/product-site/requirements-site.txt | |
| - name: Run product-site tests | |
| run: python -m pytest web-pages/product-site/tests -q | |
| - name: Build and validate twice | |
| run: | | |
| python web-pages/product-site/build.py --output /tmp/funasr-site-a | |
| python web-pages/product-site/validate.py /tmp/funasr-site-a | |
| python web-pages/product-site/build.py --output /tmp/funasr-site-b | |
| python web-pages/product-site/validate.py /tmp/funasr-site-b | |
| diff -qr /tmp/funasr-site-a /tmp/funasr-site-b | |
| browser: | |
| runs-on: ubuntu-latest | |
| needs: build-and-validate | |
| defaults: | |
| run: | |
| working-directory: web-pages/product-site/tests/browser | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: pip | |
| cache-dependency-path: web-pages/product-site/requirements-site.txt | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: npm | |
| cache-dependency-path: web-pages/product-site/tests/browser/package-lock.json | |
| - name: Install site dependencies | |
| working-directory: . | |
| run: python -m pip install -r web-pages/product-site/requirements-site.txt | |
| - name: Install browser dependencies | |
| run: npm ci | |
| - name: Install Chromium | |
| run: npx playwright install --with-deps chromium | |
| - name: Run browser tests | |
| env: | |
| SITE_PYTHON: python | |
| run: npx playwright test --config playwright.config.ts |