feat(CLI-63): auth middleware for token validation and namespace isolation #325
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: ci | |
| on: | |
| push: | |
| branches: [ staging, main ] | |
| pull_request: | |
| branches: [ staging, main ] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| backend: | |
| name: backend tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| defaults: | |
| run: | |
| working-directory: backend | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v5 | |
| - name: setup uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| cache-suffix: "backend" | |
| - name: install ffmpeg | |
| run: sudo apt-get update && sudo apt-get install -y ffmpeg | |
| - name: install dependencies | |
| run: uv sync --frozen | |
| - name: run tests | |
| run: uv run pytest -v --cov --cov-report=term | |
| frontend: | |
| name: frontend tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| defaults: | |
| run: | |
| working-directory: frontend/streamlit | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v5 | |
| - name: setup uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| cache-suffix: "frontend" | |
| - name: install dependencies | |
| run: uv sync --frozen | |
| # TODO: tests | |
| # - name: run tests | |
| # run: uv run pytest -v | |
| lint: | |
| name: code quality | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| strategy: | |
| matrix: | |
| target: | |
| - { name: backend, path: backend } | |
| - { name: frontend, path: frontend/streamlit } | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v5 | |
| - name: setup uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: install ruff | |
| run: uv tool install ruff | |
| - name: lint ${{ matrix.target.name }} | |
| working-directory: ${{ matrix.target.path }} | |
| run: uv tool run ruff check . |