feat: set up dependabot #6
Workflow file for this run
This file contains 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: | |
pull_request: | |
branches: [ main ] | |
jobs: | |
jvm: | |
runs-on: ubuntu-latest | |
env: | |
TEST_API_KEY: ${{ secrets.ALPHA_TEST_AUTH_TOKEN }} | |
TEST_CACHE_NAME: kotlin-integration-test-jvm-ci-${{ github.sha }} | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'corretto' | |
# The Android SDK is required to build the project, even if we are not running Android tests. | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v3 | |
# - name: Verify README generation | |
# uses: momentohq/standards-and-practices/github-actions/oss-readme-template@gh-actions-v2 | |
# with: | |
# project_status: official | |
# project_stability: stable | |
# project_type: sdk | |
# sdk_language: Java | |
# dev_docs_slug: java | |
- name: Commitlint and Other Shared Build Steps | |
uses: momentohq/standards-and-practices/github-actions/shared-build@gh-actions-v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and test project | |
uses: gradle/[email protected] | |
with: | |
arguments: clean build | |
android: | |
# The Android emulator only has hardware acceleration on macOS. | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
api-level: [ 23 ] | |
env: | |
TEST_API_KEY: ${{ secrets.ALPHA_TEST_AUTH_TOKEN }} | |
TEST_CACHE_NAME: kotlin-integration-test-android-ci-${{ github.sha }} | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'corretto' | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v3 | |
- name: Build project | |
uses: gradle/[email protected] | |
with: | |
arguments: clean build -x jvmTest -x testDebugUnitTest -x testReleaseUnitTest | |
- name: AVD cache | |
uses: actions/cache@v3 | |
id: avd-cache | |
with: | |
path: | | |
~/.android/avd/* | |
~/.android/adb* | |
key: avd-${{ matrix.api-level }} | |
- name: create AVD and generate snapshot for caching | |
if: steps.avd-cache.outputs.cache-hit != 'true' | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: ${{ matrix.api-level }} | |
force-avd-creation: false | |
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: false | |
script: echo "Generated AVD snapshot for caching." | |
- name: run tests | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: ${{ matrix.api-level }} | |
force-avd-creation: false | |
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: true | |
script: ./gradlew connectedCheck |