docs: update README and docs, add Android docs, remove irrelevant files #26
Workflow file for this run
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: Spring Boot CI | |
| on: | |
| push: | |
| branches: | |
| - release | |
| - develop | |
| - feature/** | |
| pull_request: | |
| branches: | |
| - release | |
| - develop | |
| permissions: | |
| contents: read | |
| checks: write | |
| pull-requests: write | |
| jobs: | |
| build: | |
| name: Build & Test | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| java-version: ['21'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Full history for better analysis | |
| - name: Set up Java ${{ matrix.java-version }} | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: ${{ matrix.java-version }} | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Run code style checks | |
| run: cd apps/backend && ./mvnw checkstyle:check -B | |
| continue-on-error: true | |
| - name: Build and test | |
| run: cd apps/backend && ./mvnw clean verify -B -Dtest='!FirebaseAuthenticationIntegrationTest,!SecurityConfigTest,!ChamaaApplicationTests,!FirebaseConfigTest' | |
| - name: Generate test reports | |
| if: always() | |
| run: | | |
| mkdir -p test-reports | |
| cp apps/backend/target/surefire-reports/*.xml test-reports/ 2>/dev/null || true | |
| cp apps/backend/target/failsafe-reports/*.xml test-reports/ 2>/dev/null || true | |
| - name: Upload test reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: spring-boot-test-reports-java${{ matrix.java-version }} | |
| path: test-reports/ | |
| retention-days: 30 | |
| - name: Publish test results | |
| if: always() | |
| uses: EnricoMi/publish-unit-test-result-action@v2 | |
| with: | |
| files: apps/backend/target/surefire-reports/*.xml | |
| check_name: Spring Boot Test Results | |
| - name: Build Docker image | |
| if: success() | |
| run: | | |
| docker build -f infra/Dockerfile -t chamaa-api:${{ github.sha }} -t chamaa-api:latest apps/backend | |
| - name: Upload build artifacts | |
| if: success() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: spring-boot-jar | |
| path: apps/backend/target/chamaa-api-*.jar | |
| retention-days: 30 | |
| code-quality: | |
| name: Code Quality Analysis | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Run SonarQube analysis | |
| env: | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} | |
| run: | | |
| cd apps/backend | |
| ./mvnw clean verify sonar:sonar \ | |
| -Dsonar.projectKey=chamaa-api \ | |
| -Dsonar.sources=src/main \ | |
| -Dsonar.exclusions="**/*Test.java" | |
| continue-on-error: true | |
| security: | |
| name: Security Scan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Check dependencies for vulnerabilities | |
| run: cd apps/backend && ./mvnw dependency-check:check -B | |
| continue-on-error: true | |
| - name: Upload dependency check report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dependency-check-report | |
| path: apps/backend/target/dependency-check-report.html | |
| retention-days: 30 |