chore: align project metadata with org-wide conventions #4
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: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| PYTHON_VERSION: "3.13" | |
| jobs: | |
| lint: | |
| name: Lint & Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Install dependencies | |
| run: pip install -e ".[dev]" | |
| - name: Ruff lint | |
| run: python -m ruff check src/ tests/ | |
| - name: Ruff format check | |
| run: python -m ruff format --check src/ tests/ | |
| test: | |
| name: Test (Python ${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: pip install -e ".[dev]" | |
| - name: Run tests | |
| run: python -m pytest tests/ --cov=flowboard --cov-report=xml -v --tb=short --junitxml=test-results.xml | |
| - name: i18n coverage check | |
| run: | | |
| python -c " | |
| import json, sys | |
| en = set(json.load(open('src/flowboard/i18n/en.json')).keys()) | |
| pl = set(json.load(open('src/flowboard/i18n/pl.json')).keys()) | |
| missing = en - pl | |
| for k in sorted(missing): | |
| print(f'Missing in pl.json: {k}') | |
| sys.exit(1 if missing else 0) | |
| " | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results-py${{ matrix.python-version }} | |
| path: test-results.xml | |
| build: | |
| name: Build Package | |
| runs-on: ubuntu-latest | |
| needs: [lint, test] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Install build tools | |
| run: pip install build | |
| - name: Build wheel | |
| run: python -m build | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist/ | |
| verify-install: | |
| name: Verify Installed Package | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Download built wheel | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist/ | |
| - name: Install from wheel (not editable) | |
| run: pip install dist/*.whl | |
| - name: Verify CLI entrypoint | |
| run: | | |
| which flowboard | |
| flowboard version | |
| - name: Generate demo dashboard | |
| run: | | |
| mkdir -p output | |
| flowboard demo --output output/demo.html | |
| test -f output/demo.html | |
| docker: | |
| name: Docker Build & Smoke Test | |
| runs-on: ubuntu-latest | |
| needs: [test] | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build Docker image | |
| run: docker build -t flowboard:latest . | |
| - name: Smoke test container | |
| run: | | |
| docker run -d --name fb-test -p 8084:8084 flowboard:latest serve --host 0.0.0.0 --port 8084 | |
| sleep 5 | |
| curl -sf http://localhost:8084/health/live || (docker logs fb-test && exit 1) | |
| docker stop fb-test |