Skip to content

Commit

Permalink
ci: temporarily enable workflow on current branch
Browse files Browse the repository at this point in the history
  • Loading branch information
abhaysood committed Oct 4, 2023
1 parent e236482 commit 832aefc
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: android

on:
push:
branches:
- run-android-tests-on-ci
pull_request:
branches:
- main
paths:
- 'measure-android/**'

env:
JAVA_VERSION: 20

jobs:
checks:
name: Checks
runs-on: ubuntu-latest
defaults:
run:
working-directory: measure-android
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: ${{ env.JAVA_VERSION }}
- run: ./ci_clear_gradle_cache.sh
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ env.CACHE_VERSION }}-${{ hashFiles('**/**.gradle.kts', '**/gradle/wrapper/gradle-wrapper.properties', '**/libs.versions.toml') }}

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

- name: Check lint
run: ./gradlew :measure:lint
unit-tests:
name: Unit tests
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: ${{ env.JAVA_VERSION }}
- run: ./ci_clear_gradle_cache.sh
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ env.CACHE_VERSION }}-${{ hashFiles('**/**.gradle.kts', '**/gradle/wrapper/gradle-wrapper.properties', '**/libs.versions.toml') }}

- name: Unit tests
run: ./gradlew :measure:testDebugUnitTest
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# macOS
.DS_Store

# .idea
.idea/

# node/bun
node_modules
2 changes: 2 additions & 0 deletions measure-android/ci-scripts/ci_clear_gradle_cache.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
mv ~/.gradle ~/.invalid || true

0 comments on commit 832aefc

Please sign in to comment.