Add Phase 1 Security Tests - URI and File Handling #12
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 Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| merge_group: | |
| jobs: | |
| license-check: | |
| name: License Check | |
| runs-on: macOS-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '17' | |
| cache: 'gradle' | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Run licensee | |
| run: ./gradlew licensee --stacktrace | |
| ktlint: | |
| name: Kotlin Lint (ktlint) | |
| runs-on: macOS-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '17' | |
| cache: 'gradle' | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Run ktlint | |
| run: ./gradlew ktlint --stacktrace | |
| lint: | |
| name: Android Lint | |
| runs-on: macOS-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '17' | |
| cache: 'gradle' | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Run Android lint | |
| run: ./gradlew lintDebug --stacktrace | |
| - name: Upload lint reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: lint-reports | |
| path: | | |
| cropper/build/reports/lint-results-*.html | |
| cropper/build/reports/lint-results-*.xml | |
| retention-days: 7 | |
| unit-tests: | |
| name: Unit Tests (JDK ${{ matrix.java_version }}) | |
| runs-on: macOS-latest | |
| timeout-minutes: 15 | |
| strategy: | |
| matrix: | |
| java_version: [17] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup JDK ${{ matrix.java_version }} | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'zulu' | |
| java-version: ${{ matrix.java_version }} | |
| cache: 'gradle' | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Run unit tests | |
| run: ./gradlew testDebug --stacktrace | |
| - name: Upload test reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-reports-jdk-${{ matrix.java_version }} | |
| path: | | |
| cropper/build/reports/tests/ | |
| sample/build/reports/tests/ | |
| retention-days: 7 | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results-jdk-${{ matrix.java_version }} | |
| path: | | |
| cropper/build/test-results/ | |
| sample/build/test-results/ | |
| retention-days: 7 |