Add github actions script + remove travis.yml #5
Workflow file for this run
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: Kotlin SDK CI with Gradle | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 11 | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'adopt' | |
| java-version: '11' | |
| - name: Prepare Cloudinary URL | |
| id: cloudinary | |
| run: | | |
| CLOUDINARY_URL=$(bash tools/get_test_cloud.sh) | |
| echo "CLOUDINARY_URL=$CLOUDINARY_URL" >> $GITHUB_ENV | |
| echo "cloud_name: $(echo $CLOUDINARY_URL | cut -d'@' -f2)" | |
| - name: Clean Gradle plugin cache | |
| run: | | |
| rm -f $HOME/.gradle/caches/modules-2/modules-2.lock | |
| rm -fr $HOME/.gradle/caches/*/plugin-resolution/ | |
| - name: Cache Gradle | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Run tests | |
| run: ./gradlew clean test |