chore(backend): Bump Microsoft.EntityFrameworkCore.Design from 8.0.0 to 9.0.13 #19
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: Pull Request Checks | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| jobs: | |
| pr-validation: | |
| name: Validate PR | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Validate PR title | |
| uses: amannn/action-semantic-pull-request@v5 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| types: | | |
| feat | |
| fix | |
| docs | |
| style | |
| refactor | |
| perf | |
| test | |
| build | |
| ci | |
| chore | |
| revert | |
| continue-on-error: true | |
| - name: Check for merge conflicts | |
| run: | | |
| git fetch origin ${{ github.base_ref }} | |
| if ! git merge-tree $(git merge-base HEAD origin/${{ github.base_ref }}) HEAD origin/${{ github.base_ref }} | grep -q "^<<<<<<<"; then | |
| echo "No merge conflicts detected" | |
| else | |
| echo "Merge conflicts detected" | |
| exit 1 | |
| fi | |
| - name: Check file sizes | |
| run: | | |
| large_files=$(find . -type f -size +1M -not -path "*/node_modules/*" -not -path "*/.git/*" -not -path "*/bin/*" -not -path "*/obj/*") | |
| if [ -n "$large_files" ]; then | |
| echo "Warning: Large files detected:" | |
| echo "$large_files" | |
| fi | |
| changed-files: | |
| name: Detect Changed Files | |
| runs-on: ubuntu-latest | |
| outputs: | |
| backend: ${{ steps.changes.outputs.backend }} | |
| frontend: ${{ steps.changes.outputs.frontend }} | |
| docker: ${{ steps.changes.outputs.docker }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Detect changes | |
| uses: dorny/paths-filter@v3 | |
| id: changes | |
| with: | |
| filters: | | |
| backend: | |
| - 'Backend/**' | |
| frontend: | |
| - 'Frontend/**' | |
| docker: | |
| - '**/Dockerfile' | |
| - 'docker-compose*.yml' | |
| backend-checks: | |
| name: Backend PR Checks | |
| needs: changed-files | |
| if: needs.changed-files.outputs.backend == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Restore and build | |
| run: | | |
| cd Backend | |
| dotnet restore | |
| dotnet build --configuration Release | |
| - name: Run tests with coverage | |
| run: | | |
| cd Backend | |
| dotnet test --configuration Release --collect:"XPlat Code Coverage" | |
| continue-on-error: true | |
| - name: Comment PR with build status | |
| uses: actions/github-script@v7 | |
| if: always() | |
| with: | |
| script: | | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: '✅ Backend build and tests completed successfully!' | |
| }) | |
| frontend-checks: | |
| name: Frontend PR Checks | |
| needs: changed-files | |
| if: needs.changed-files.outputs.frontend == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'npm' | |
| cache-dependency-path: ./Frontend/package-lock.json | |
| - name: Install and build | |
| run: | | |
| cd Frontend | |
| npm ci | |
| npm run build | |
| - name: Run tests | |
| run: | | |
| cd Frontend | |
| npm test -- --coverage --watchAll=false | |
| env: | |
| CI: true | |
| continue-on-error: true | |
| - name: Check bundle size | |
| run: | | |
| cd Frontend | |
| npm run build | |
| size=$(du -sh build | cut -f1) | |
| echo "Bundle size: $size" | |
| - name: Comment PR with build status | |
| uses: actions/github-script@v7 | |
| if: always() | |
| with: | |
| script: | | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: '✅ Frontend build and tests completed successfully!' | |
| }) | |
| docker-checks: | |
| name: Docker PR Checks | |
| needs: changed-files | |
| if: needs.changed-files.outputs.docker == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build backend Docker image | |
| run: | | |
| docker build -t todoapp-backend:pr ./Backend | |
| - name: Build frontend Docker image | |
| run: | | |
| docker build -t todoapp-frontend:pr ./Frontend | |
| - name: Test Docker Compose | |
| run: | | |
| docker-compose config | |
| - name: Comment PR with Docker status | |
| uses: actions/github-script@v7 | |
| if: always() | |
| with: | |
| script: | | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: '🐳 Docker images built successfully!' | |
| }) | |
| auto-label: | |
| name: Auto Label PR | |
| runs-on: ubuntu-latest | |
| needs: changed-files | |
| steps: | |
| - name: Label backend changes | |
| if: needs.changed-files.outputs.backend == 'true' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| github.rest.issues.addLabels({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| labels: ['backend'] | |
| }) | |
| - name: Label frontend changes | |
| if: needs.changed-files.outputs.frontend == 'true' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| github.rest.issues.addLabels({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| labels: ['frontend'] | |
| }) | |
| - name: Label Docker changes | |
| if: needs.changed-files.outputs.docker == 'true' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| github.rest.issues.addLabels({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| labels: ['docker'] | |
| }) |