Update actions/upload-artifact action to v6 #164
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: Build App | |
| permissions: | |
| contents: read | |
| security-events: write | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ '*' ] | |
| jobs: | |
| validation: | |
| name: "Validate wrapper" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5.0.0 | |
| - uses: gradle/actions/wrapper-validation@v4 | |
| lint: | |
| needs: [ validation ] | |
| name: "Spotless check" | |
| runs-on: macos-latest | |
| steps: | |
| - name: "Checkout code" | |
| uses: actions/checkout@v5.0.0 | |
| - name: "Set up JDK" | |
| uses: actions/setup-java@v5.0.0 | |
| with: | |
| distribution: 'zulu' | |
| java-version: 17 | |
| - name: "Run spotless" | |
| run: ./gradlew spotlessCheck | |
| mobsfscan: | |
| needs: [ validation ] | |
| name: "Run mobsfscan" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5.0.0 | |
| - uses: actions/setup-python@v5.6.0 | |
| with: | |
| python-version: '3.12' | |
| - name: "Run mobsfscan" | |
| uses: MobSF/mobsfscan@main | |
| with: | |
| args: 'sharedprefs-core/ sharedprefs-ktx/ --sarif --output mobsfscan.sarif || true' | |
| - name: "Upload mobsfscan report" | |
| uses: github/codeql-action/upload-sarif@v3 | |
| with: | |
| sarif_file: mobsfscan.sarif | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: mobsfscan.sarif | |
| path: mobsfscan.sarif | |
| build: | |
| needs: [ lint ] | |
| name: "Build and test app" | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| api-level: [ 23, 35 ] | |
| arch: [ x86_64 ] | |
| target: [ google_apis ] | |
| channel: [ stable ] | |
| steps: | |
| - name: "Checkout code" | |
| uses: actions/checkout@v5.0.0 | |
| - name: "Set up JDK" | |
| uses: actions/setup-java@v5.0.0 | |
| with: | |
| distribution: 'zulu' | |
| java-version: 17 | |
| - name: "Build with Gradle" | |
| run: | | |
| ./gradlew assemble --stacktrace | |
| - name: "Enable KVM" | |
| run: | | |
| echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
| sudo udevadm control --reload-rules | |
| sudo udevadm trigger --name-match=kvm | |
| - name: "Run tests" | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| api-level: ${{ matrix.api-level }} | |
| target: ${{ matrix.target }} | |
| arch: ${{ matrix.arch }} | |
| script: ./gradlew connectedCheck |