Skip to content
This repository has been archived by the owner on Oct 6, 2024. It is now read-only.

Commit

Permalink
CI API 24
Browse files Browse the repository at this point in the history
  • Loading branch information
breautek committed Dec 10, 2023
1 parent e7baf2d commit 964dd71
Show file tree
Hide file tree
Showing 7 changed files with 262 additions and 9 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/instrumented.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# This file is autogenerated, do not modify

name: Android Instrumented Tests

Expand All @@ -7,21 +8,18 @@ on:
pull_request:
branches: [ "main" ]

env:
JAVA_VERSION: 17
JAVA_DISTRIBUTION: temurin

jobs:

API-24:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: set up JDK
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: ${{env.JAVA_VERSION}}
distribution: ${{env.JAVA_DISTRIBUTION}}
java-version: 17
distribution: temurin
cache: gradle
- name: Install Gradle Wrapper
run: gradle wrapper
Expand All @@ -34,4 +32,4 @@ jobs:
arch: x86_64
target: google_apis
script: ./gradlew :fuse:connectedCheck

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ gradlew.bat
.gradle
local.properties
.idea/deploymentTargetDropDown.xml

node_modules
189 changes: 189 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "fuse-android",
"private": true,
"version": "1.0.0",
"scripts": {
"compile-workflows": "ejs -f ./templates/workflows/data.json -o ./.github/workflows/instrumented.yml ./templates/workflows/instrumented.ejs"
},
"author": "Breautek",
"license": "Apache-2.0",
"devDependencies": {
"ejs": "^3.1.9"
}
}
1 change: 1 addition & 0 deletions templates/workflows/AutoGeneratedWarning.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# This file is autogenerated, do not modify
17 changes: 17 additions & 0 deletions templates/workflows/data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"config": {
"actionCheckoutVersion": "v4",
"actionSetupJavaVersion": "v3",
"actionAndroidEmulatorRunnerVersion": "v2",
"javaVersion": 17,
"javaDistribution": "temurin"
},
"jobs": [
{
"id": "API-24",
"api": 24,
"arch": "x86_64",
"target": "google_apis"
}
]
}
35 changes: 35 additions & 0 deletions templates/workflows/instrumented.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<%- include('AutoGeneratedWarning'); %>

name: Android Instrumented Tests

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
<% for (const job of jobs) { %>
<%= job.id %>:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@<%= config.actionCheckoutVersion %>
- name: set up JDK <%= config.javaVersion %>
uses: actions/setup-java@<%= config.actionSetupJavaVersion %>
with:
java-version: <%= config.javaVersion %>
distribution: <%= config.javaDistribution %>
cache: gradle
- name: Install Gradle Wrapper
run: gradle wrapper
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: run tests
uses: reactivecircus/android-emulator-runner@<%= config.actionAndroidEmulatorRunnerVersion %>
with:
api-level: <%= job.api %>
arch: <%= job.arch %>
target: <%= job.target %>
script: ./gradlew :fuse:connectedCheck
<% } %>

0 comments on commit 964dd71

Please sign in to comment.