Skip to content

Commit 4b474e8

Browse files
authored
Merge pull request #21 from KvColorPalette/feature/create-android-ci
Feature/create android ci
2 parents 7355e4b + 9c834e0 commit 4b474e8

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/android-ci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: KvColorPalette-Android CI
2+
3+
on:
4+
# Runs on pushes targeting the default branch
5+
push:
6+
branches: [ "main" ]
7+
# Runs on create pull-request to targeting the default branch
8+
pull_request:
9+
branches: [ "main" ]
10+
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
13+
14+
jobs:
15+
build:
16+
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: Set up JDK 21
24+
uses: actions/setup-java@v4
25+
with:
26+
distribution: 'temurin'
27+
java-version: 21
28+
29+
- name: Cache Gradle files
30+
uses: actions/cache@v3
31+
with:
32+
path: |
33+
~/.gradle/caches
34+
~/.gradle/wrapper
35+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
36+
restore-keys: |
37+
${{ runner.os }}-gradle
38+
39+
- name: Grant execute permission for gradlew
40+
run: chmod +x gradlew
41+
42+
- name: Build project
43+
run: ./gradlew assembleDebug
44+
45+
- name: Run unit tests
46+
run: ./gradlew testDebugUnitTest

0 commit comments

Comments
 (0)