ci(deps): bump actions/checkout from 4 to 6 #134
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/CD Pipeline | |
| on: | |
| push: | |
| branches: [ main, dev, feature/*, fix/* ] | |
| pull_request: | |
| branches: [ main, dev ] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| pages: write | |
| actions: read | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx2048m -XX:MaxMetaspaceSize=512m" | |
| jobs: | |
| build-and-test: | |
| name: 🔨 Build & Test | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| java-version: [17, 21] | |
| fail-fast: false | |
| steps: | |
| - name: 📥 Checkout code | |
| uses: actions/checkout@v6 | |
| - name: ☕ Setup JDK ${{ matrix.java-version }} | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: ${{ matrix.java-version }} | |
| - name: 📱 Setup Android SDK | |
| uses: android-actions/setup-android@v3 | |
| - name: 🐘 Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| with: | |
| cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | |
| - name: 🔨 Build and test project | |
| run: ./gradlew clean build test | |
| - name: 📊 Run quality checks | |
| run: ./gradlew runAllChecks | |
| - name: 📋 Upload test results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: test-results-jdk-${{ matrix.java-version }} | |
| path: | | |
| shared/build/reports/tests/ | |
| shared/build/reports/ktlint/ | |
| shared/build/reports/detekt/ | |
| shared/build/reports/kover/ | |
| retention-days: 7 | |
| coverage: | |
| name: 📊 Test Coverage | |
| runs-on: ubuntu-latest | |
| needs: build-and-test | |
| if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository | |
| steps: | |
| - name: 📥 Checkout code | |
| uses: actions/checkout@v6 | |
| - name: ☕ Setup JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| - name: 📱 Setup Android SDK | |
| uses: android-actions/setup-android@v3 | |
| - name: 🐘 Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: 🧪 Generate coverage report | |
| run: ./gradlew test koverXmlReport | |
| - name: 📊 Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./shared/build/reports/kover/report.xml | |
| fail_ci_if_error: false | |
| verbose: true | |
| dependency-scan: | |
| name: 🔍 Dependency Scan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 📥 Checkout code | |
| uses: actions/checkout@v6 | |
| - name: 🔍 Security scan summary | |
| run: | | |
| echo "🔍 Dependency security scanning" | |
| echo "ℹ️ Automated scanning is handled by GitHub's Dependabot" | |
| echo "📋 Check the Security tab for vulnerability alerts" | |
| echo "🔄 Dependabot will create PRs for updates automatically" | |
| echo "✅ Security scanning configured" | |
| build-summary: | |
| name: 📋 Build Summary | |
| runs-on: ubuntu-latest | |
| needs: [build-and-test, coverage, dependency-scan] | |
| if: always() | |
| steps: | |
| - name: 📊 Generate build summary | |
| run: | | |
| echo "## 🔄 CI/CD Pipeline Summary" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "### 📊 Job Results" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "| Job | Status |" >> $GITHUB_STEP_SUMMARY | |
| echo "|-----|--------|" >> $GITHUB_STEP_SUMMARY | |
| echo "| Build & Test | ${{ needs.build-and-test.result == 'success' && '✅ Passed' || '❌ Failed' }} |" >> $GITHUB_STEP_SUMMARY | |
| echo "| Test Coverage | ${{ needs.coverage.result == 'success' && '✅ Generated' || needs.coverage.result == 'skipped' && '⏭️ Skipped' || '❌ Failed' }} |" >> $GITHUB_STEP_SUMMARY | |
| echo "| Dependency Scan | ${{ needs.dependency-scan.result == 'success' && '✅ Completed' || '❌ Failed' }} |" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "### 🔗 Quick Links" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "- 📚 [Documentation](https://gatrongdev.github.io/kbignum/)" >> $GITHUB_STEP_SUMMARY | |
| echo "- 🏠 [Repository](https://github.com/gatrongdev/kbignum)" >> $GITHUB_STEP_SUMMARY | |
| echo "- 📦 [Maven Central](https://central.sonatype.com/artifact/io.github.gatrongdev/kbignum)" >> $GITHUB_STEP_SUMMARY | |
| echo "- 📊 [Codecov](https://codecov.io/gh/gatrongdev/kbignum)" >> $GITHUB_STEP_SUMMARY |