Refactor architecture section in README #3
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] | |
| jobs: | |
| backend-lint: | |
| name: Backend Lint | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: backend | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install ruff | |
| run: pip install ruff | |
| - name: Lint | |
| run: ruff check . | |
| - name: Format check | |
| run: ruff format --check . | |
| frontend-lint: | |
| name: Frontend Lint & Build | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: frontend | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "yarn" | |
| cache-dependency-path: frontend/yarn.lock | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Lint | |
| run: yarn lint 2>/dev/null || true | |
| - name: Build | |
| run: yarn build | |
| docker-build: | |
| name: Docker Build | |
| runs-on: ubuntu-latest | |
| needs: [backend-lint, frontend-lint] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build backend image | |
| run: docker build -f Dockerfile.backend -t pretexta-backend:test . | |
| - name: Build frontend image | |
| run: docker build -f Dockerfile.frontend -t pretexta-frontend:test . |