Skip to content

Commit

Permalink
Github CI (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldbonkowski authored Nov 6, 2023
1 parent d10f956 commit 9db4dbe
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Android CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle

- name: Cache Gradle dependencies
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-${{ runner.os }}-
- name: Build with Gradle
run: |
chmod +x gradlew
./gradlew test
continue-on-error: true
2 changes: 1 addition & 1 deletion app/src/main/java/com/example/househomey/Item.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class Item {
* @throws NullPointerException if a null required field is given
*/
public Item(String id, @NonNull Map<String, Object> data) {
// Required fields
// Required fields, will throw exceptions
this.id = Objects.requireNonNull(id);
this.description = (String) Objects.requireNonNull(data.get("description"));
this.acquisitionDate = ((Timestamp) Objects.requireNonNull(data.get("acquisitionDate"))).toDate();
Expand Down

0 comments on commit 9db4dbe

Please sign in to comment.