📝 feat : added fe & be sonar screen shot PR #45
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: Simple CI | |
| on: | |
| push: | |
| branches: [main, BE_*, FE_*] | |
| pull_request: | |
| branches: [main, BE_*, FE_*] | |
| jobs: | |
| build-backend: | |
| name: 🚀 Build Spring Boot Backend (Java 21) | |
| runs-on: ubuntu-latest | |
| if: | | |
| github.event_name == 'pull_request' || | |
| startsWith(github.ref_name, 'BE_') || | |
| contains(github.event.head_commit.message, '[backend]') | |
| steps: | |
| - name: ⬇️ Checkout code | |
| uses: actions/checkout@v3 | |
| - name: ☕ Set up JDK 21 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| - name: 🛠️ Build with Maven | |
| run: | | |
| cd backend | |
| mvn clean install -DskipTests | |
| build-frontend: | |
| name: 🌐 Build React Frontend | |
| runs-on: ubuntu-latest | |
| if: | | |
| github.event_name == 'pull_request' || | |
| startsWith(github.ref_name, 'FE_') || | |
| contains(github.event.head_commit.message, '[frontend]') | |
| steps: | |
| - name: ⬇️ Checkout code | |
| uses: actions/checkout@v3 | |
| - name: 🔧 Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18' | |
| - name: 📦 Install and Build | |
| run: | | |
| cd frontend | |
| npm install | |
| npm run build |