Merge branch 'feat/api-integration' of github.com:PoCInnovation/Distr… #8
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: | |
| pull_request: | |
| jobs: | |
| frontend-format: | |
| name: Check Frontend Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: latest | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'pnpm' | |
| cache-dependency-path: 'frontend/pnpm-lock.yaml' | |
| - name: Install pnpm | |
| run: corepack enable && corepack prepare pnpm@latest --activate | |
| - name: Install dependencies | |
| working-directory: ./frontend | |
| run: pnpm install --frozen-lockfile | |
| - name: Install prettier | |
| working-directory: ./frontend | |
| run: pnpm add -D prettier | |
| - name: Check formatting with prettier | |
| working-directory: ./frontend | |
| run: pnpm exec prettier --check app | |
| frontend-build: | |
| name: Build Frontend | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: latest | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'pnpm' | |
| cache-dependency-path: 'frontend/pnpm-lock.yaml' | |
| - name: Install pnpm | |
| run: corepack enable && corepack prepare pnpm@latest --activate | |
| - name: Install dependencies | |
| working-directory: ./frontend | |
| run: pnpm install --frozen-lockfile | |
| - name: Build frontend | |
| working-directory: ./frontend | |
| run: pnpm build | |
| backend-format: | |
| name: Check Backend Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install autopep8 | |
| run: pip install autopep8 | |
| - name: Check formatting with autopep8 | |
| working-directory: ./backend | |
| run: | | |
| autopep8 --diff --recursive --select=E,W app/ > /tmp/autopep8.diff || true | |
| if [ -s /tmp/autopep8.diff ]; then | |
| echo "Code formatting issues found. Please run: autopep8 --in-place --recursive --select=E,W app/" | |
| cat /tmp/autopep8.diff | |
| exit 1 | |
| fi | |
| # | |
| # backend-typecheck: | |
| # name: Check Backend Types and Build | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - name: Checkout code | |
| # uses: actions/checkout@v4 | |
| # | |
| # - name: Setup Python | |
| # uses: actions/setup-python@v5 | |
| # with: | |
| # python-version: '3.13' | |
| # | |
| # - name: Install dependencies | |
| # working-directory: ./backend | |
| # run: | | |
| # pip install -r requirements.txt | |
| # pip install mypy | |
| # | |
| # - name: Type check with mypy | |
| # working-directory: ./backend | |
| # run: | | |
| # mypy app/ --ignore-missing-imports |