feat: production-ready CryptoKit refactor per spec #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" | |
| on: | |
| push: | |
| branches: [ "main", "master" ] | |
| pull_request: | |
| branches: [ "main", "master" ] | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Step 1: Checkout repository | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| # Step 2: Set up JDK 17 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| # Step 3: Cache Gradle dependencies | |
| - name: Cache Gradle Dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| # Step 4: Grant execute permission for gradlew | |
| - name: Grant Execute Permission for Gradlew | |
| run: chmod +x ./gradlew | |
| # Step 5: Build with Gradle | |
| - name: Build with Gradle | |
| run: ./gradlew build | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| # Step 1: Checkout repository | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| # Step 2: Set up JDK 17 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| # Step 3: Cache Gradle dependencies | |
| - name: Cache Gradle Dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| # Step 4: Grant execute permission for gradlew | |
| - name: Grant Execute Permission for Gradlew | |
| run: chmod +x ./gradlew | |
| # Step 5: Run unit tests | |
| - name: Run Unit Tests | |
| run: ./gradlew test | |
| # Step 6: Run lint | |
| - name: Run Lint | |
| run: ./gradlew lint | |
| # Step 7: Upload test results as artifacts | |
| - name: Upload Test Results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: test-results | |
| path: | | |
| **/build/test-results/ | |
| **/build/reports/tests/ | |
| retention-days: 14 | |
| # Step 8: Upload lint results as artifacts | |
| - name: Upload Lint Results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: lint-results | |
| path: | | |
| **/build/reports/lint-results* | |
| retention-days: 14 |