diff --git a/.github/workflows/apikeys-ci.xml b/.github/workflows/apikeys-ci.xml new file mode 100644 index 00000000..f1764bd2 --- /dev/null +++ b/.github/workflows/apikeys-ci.xml @@ -0,0 +1,7 @@ + + ci + ci + ci + ci + ci + diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..00305977 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,34 @@ +on: + pull_request: + push: + branches: + - master + +name: Tests + +jobs: + + test: + name: Build and Test (${{ matrix.buildvariant }}) + runs-on: ubuntu-latest + strategy: + matrix: + buildvariant: [Foss, Google] + steps: + - name: Check out code + uses: actions/checkout@v2 + + - name: Set up Java environment + uses: actions/setup-java@v2 + with: + java-version: 11 + distribution: 'zulu' + cache: 'gradle' + + - name: Copy apikeys.xml + run : cp .github/workflows/apikeys-ci.xml app/src/main/res/values/apikeys.xml + + - name: Build app + run: ./gradlew assemble${{ matrix.buildvariant }}Debug --no-daemon + - name: Run unit tests + run: ./gradlew test${{ matrix.buildvariant }}DebugUnitTest --no-daemon