Initial commit: AI Radiology Assistant full-stack project #1
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 Pipeline | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| backend: | |
| name: Backend Job | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install backend dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install flake8 | |
| if [ -f backend/requirements.txt ]; then pip install -r backend/requirements.txt; fi | |
| - name: Run lint checks | |
| run: | | |
| cd backend | |
| flake8 . | |
| frontend: | |
| name: Frontend Job | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js 20 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Install frontend dependencies | |
| run: | | |
| cd frontend | |
| npm install | |
| - name: Run Next.js build | |
| run: | | |
| cd frontend | |
| npm run build | |
| docker: | |
| name: Docker Job | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build backend Docker image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: docker/Dockerfile.backend | |
| push: false | |
| tags: ai-radiology-backend:test | |
| - name: Build frontend Docker image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: docker/Dockerfile.frontend | |
| push: false | |
| tags: ai-radiology-frontend:test |