Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup GitHub Actions for tests #360

Merged
merged 2 commits into from
Jan 19, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Initial workflow
  • Loading branch information
MGaetan89 committed Jan 19, 2021
commit 8f7816d467211c668f5004e8985a54a84158eabb
67 changes: 67 additions & 0 deletions .github/workflows/validate_tableview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Validate TableView

on:
push:
pull_request:

jobs:
build:
name: Build
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1

- name: Setup JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Setup Cache
uses: actions/cache@v2
with:
path: |
~/.gradle/caches/
~/.gradle/wrapper/
key: cache-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: cache-gradle-

- name: Build
run: ./gradlew :tableview:assembleDebug --no-daemon

android-tests:
name: Android Tests
needs: build
# Using macos-latest to take advantage of the hardware acceleration
runs-on: macos-latest
strategy:
matrix:
api-level: [ 15, 29 ]

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Setup Cache
uses: actions/cache@v2
with:
path: |
~/.gradle/caches/
~/.gradle/wrapper/
key: cache-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: cache-gradle-

- name: Android Test - API ${{ matrix.api-level }}
uses: ReactiveCircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
script: ./gradlew :tableview:connectedDebugAndroidTest --no-daemon