Skip to content

Commit

Permalink
Add GitHub Actions script
Browse files Browse the repository at this point in the history
  • Loading branch information
tonykolomeytsev committed Dec 16, 2021
1 parent 9cb58d0 commit 94a14a4
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/pull_requests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Android Debug Build

on:
pull_request:
branches:
- master

jobs:
test:
name: Unit Tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Cache gradle files
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle
- name: Cache build files
uses: actions/cache@v1
with:
path: build
key: ${{ runner.OS }}-build-${{ hashFiles('**/*.kt') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
- name: Unit tests
run: ./gradlew -Pci test --stacktrace

build:
name: Debug Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Cache gradle files
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle
- name: Cache build files
uses: actions/cache@v1
with:
path: build
key: ${{ runner.OS }}-build-${{ hashFiles('**/*.kt') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
- name: Build with Gradle
run: ./gradlew -Pci assembleDebug
env:
MAP_KEY: ${{ secrets.MAP_KEY }}

0 comments on commit 94a14a4

Please sign in to comment.