Add WorkOS profile factory (Python + TypeScript) #15
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 | |
| # Cancel an in-progress run when a new commit lands on the same ref — | |
| # saves Actions minutes during rapid pushes. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| python: | |
| name: Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # Cover the supported Python range on Linux. One Windows job on | |
| # the dev-default version catches Windows-specific regressions | |
| # (CRLF, path separators, async event-loop policies). | |
| include: | |
| - { os: ubuntu-latest, python-version: "3.10" } | |
| - { os: ubuntu-latest, python-version: "3.11" } | |
| - { os: ubuntu-latest, python-version: "3.12" } | |
| - { os: ubuntu-latest, python-version: "3.13" } | |
| - { os: windows-latest, python-version: "3.12" } | |
| defaults: | |
| run: | |
| working-directory: packages/demarche-py | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| cache-dependency-path: packages/demarche-py/pyproject.toml | |
| - name: Install package (with dev extras) | |
| run: pip install -e ".[dev]" | |
| - name: Lint (ruff) | |
| run: ruff check src tests | |
| - name: Type check (mypy) | |
| run: mypy src | |
| - name: Tests (pytest) | |
| run: pytest -v --tb=short | |
| fastapi-example: | |
| name: FastAPI example end-to-end | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| cache-dependency-path: packages/demarche-py/pyproject.toml | |
| - name: Install demarche with fastapi extra | |
| run: pip install -e "packages/demarche-py[fastapi]" | |
| - name: Run example smoke test | |
| working-directory: examples/fastapi-app | |
| run: python demo_client.py | |
| typescript: | |
| name: TypeScript on Node ${{ matrix.node-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: ["20", "22"] | |
| defaults: | |
| run: | |
| working-directory: packages/demarche-ts | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: npm | |
| cache-dependency-path: packages/demarche-ts/package-lock.json | |
| - name: Install | |
| run: npm ci | |
| - name: Type check | |
| run: npm run typecheck | |
| - name: Build | |
| run: npm run build | |
| - name: Test | |
| run: npm test |