|
9 | 9 | danger:
|
10 | 10 | runs-on: ubuntu-latest
|
11 | 11 | steps:
|
12 |
| - - uses: actions/checkout@v1 |
| 12 | + - name: Checkout |
| 13 | + |
| 14 | + |
| 15 | + - name: Bundler Cache |
| 16 | + |
| 17 | + with: |
| 18 | + path: vendor/bundle |
| 19 | + key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} |
| 20 | + restore-keys: | |
| 21 | + ${{ runner.os }}-gems- |
13 | 22 | - name: Setup Ruby for use with actions
|
14 | 23 |
|
15 | 24 | with:
|
16 |
| - ruby-version: '2.6' |
17 |
| - architecture: 'x64' |
18 |
| - - name: Install danger |
| 25 | + ruby-version: '2.7' |
| 26 | + - name: Install Danger |
19 | 27 | run: |
|
20 | 28 | gem install bundler
|
21 |
| - bundle install |
| 29 | + bundle config set path 'vendor/bundle' |
| 30 | + bundle config set clean 'true' |
| 31 | + bundle check || bundle install --jobs 4 --retry 3 |
| 32 | +
|
| 33 | + - name: Gradle dist Cache |
| 34 | + |
| 35 | + with: |
| 36 | + path: ~/.gradle/wrapper |
| 37 | + key: ${{ runner.os }}-dist-gradle-${{ hashFiles('**/gradle-wrapper.properties') }} |
| 38 | + - name: Gradle dependencies Cache |
| 39 | + |
| 40 | + with: |
| 41 | + path: ~/.gradle/caches |
| 42 | + key: ${{ runner.os }}-v1-gradle-${{ hashFiles('./build.gradle') }}-${{ hashFiles('**/build.gradle') }} |
| 43 | + restore-keys: | |
| 44 | + ${{ runner.os }}-v1-gradle-${{ hashFiles('./build.gradle') }}- |
| 45 | + ${{ runner.os }}-v1-gradle- |
| 46 | + - name: Download Dependencies |
| 47 | + run: | |
| 48 | + ./gradlew androidDependencies --no-daemon |
| 49 | +
|
22 | 50 | - name: Run danger
|
23 | 51 | env:
|
24 | 52 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
25 | 53 | run: danger
|
| 54 | + |
26 | 55 | unit_test:
|
27 | 56 | runs-on: ubuntu-latest
|
28 | 57 | steps:
|
29 |
| - - uses: actions/checkout@v1 |
| 58 | + - name: Checkout |
| 59 | + |
| 60 | + |
| 61 | + - name: Gradle dist Cache |
| 62 | + |
| 63 | + with: |
| 64 | + path: ~/.gradle/wrapper |
| 65 | + key: ${{ runner.os }}-dist-gradle-${{ hashFiles('**/gradle-wrapper.properties') }} |
| 66 | + - name: Gradle dependencies Cache |
| 67 | + |
| 68 | + with: |
| 69 | + path: ~/.gradle/caches |
| 70 | + key: ${{ runner.os }}-v1-gradle-${{ hashFiles('**/build.gradle') }} |
| 71 | + restore-keys: | |
| 72 | + ${{ runner.os }}-v1-gradle- |
| 73 | + - name: Download Dependencies |
| 74 | + run: | |
| 75 | + ./gradlew androidDependencies --no-daemon |
| 76 | +
|
30 | 77 | - name: Run unit test
|
31 | 78 | run: ./gradlew studyplus-android-sdk:test
|
32 | 79 |
|
0 commit comments