aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMenny Even Danan <menny@evendanan.net>2019-10-30 16:06:40 +0000
committerMenny Even Danan <menny@evendanan.net>2019-10-30 16:30:14 +0000
commit467fa4b6daa14b41b4ef9db02e32bad1709e3599 (patch)
treed187325d6af2440c974198170d64de8e6b3344b6
parent0ae3cfe42c0d5b475f34ce5172de56cf8a040270 (diff)
downloadAnySoftKeyboard-467fa4b6daa14b41b4ef9db02e32bad1709e3599.tar.gz
AnySoftKeyboard-467fa4b6daa14b41b4ef9db02e32bad1709e3599.tar.bz2
A few changes to the actions def
-rw-r--r--.github/actions/codecov/action.yml5
-rw-r--r--.github/actions/codecov/upload_coverage.sh2
-rw-r--r--.github/actions/collect-reports/action.yml6
-rw-r--r--.github/actions/collect-reports/collect.sh1
-rw-r--r--.github/actions/normal-test-shard-run/run_tests.sh1
-rw-r--r--.github/actions/test-shard-run/action.yml (renamed from .github/actions/normal-test-shard-run/action.yml)18
-rw-r--r--.github/actions/test-shard-run/run_tests.sh10
-rw-r--r--.github/workflows/anysoftkeyboard.yml45
8 files changed, 52 insertions, 36 deletions
diff --git a/.github/actions/codecov/action.yml b/.github/actions/codecov/action.yml
index d98e5e0d4..ae6de1d98 100644
--- a/.github/actions/codecov/action.yml
+++ b/.github/actions/codecov/action.yml
@@ -1,5 +1,6 @@
name: "Code Cov"
author: "menny"
+
runs:
using: "docker"
image: "docker://menny/ndk_ask:1.13.1"
@@ -9,3 +10,7 @@ runs:
entrypoint: /bin/bash
args:
- .github/actions/codecov/upload_coverage.sh
+
+branding:
+ icon: 'pie-chart'
+ color: 'green'
diff --git a/.github/actions/codecov/upload_coverage.sh b/.github/actions/codecov/upload_coverage.sh
index 4dc7bcda9..6d399d23f 100644
--- a/.github/actions/codecov/upload_coverage.sh
+++ b/.github/actions/codecov/upload_coverage.sh
@@ -1,3 +1,5 @@
+#!/usr/bin/env bash
+
curl https://codecov.io/bash -o codecov.sh
chmod +x codecov.sh
./codecov.sh -X gcov -X coveragepy -X xcode `find . -name "test*UnitTestCoverage.xml" | xargs -n 1 echo -n " -f "`
diff --git a/.github/actions/collect-reports/action.yml b/.github/actions/collect-reports/action.yml
index 4cba33af3..b09e27ec8 100644
--- a/.github/actions/collect-reports/action.yml
+++ b/.github/actions/collect-reports/action.yml
@@ -1,11 +1,13 @@
name: "Collect reports"
author: "menny"
+
inputs:
output_folder:
description: "collect destination"
default: "collected_reports"
file_pattern:
description: "pattern"
+
runs:
using: "docker"
image: "docker://menny/ndk_ask:1.13.1"
@@ -14,3 +16,7 @@ runs:
- .github/actions/collect-reports/collect.sh
- ${{ inputs.output_folder }}
- ${{ inputs.file_pattern }}
+
+branding:
+ icon: 'package'
+ color: 'brown'
diff --git a/.github/actions/collect-reports/collect.sh b/.github/actions/collect-reports/collect.sh
index f92325762..da274db47 100644
--- a/.github/actions/collect-reports/collect.sh
+++ b/.github/actions/collect-reports/collect.sh
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
OUTPUT=${1}
PATTERN=${2}
diff --git a/.github/actions/normal-test-shard-run/run_tests.sh b/.github/actions/normal-test-shard-run/run_tests.sh
deleted file mode 100644
index 7a1a0c218..000000000
--- a/.github/actions/normal-test-shard-run/run_tests.sh
+++ /dev/null
@@ -1 +0,0 @@
-./gradlew --stacktrace app:testDebugUnitTest app:testDebugUnitTestCoverage -PexcludeTestClasses="**/*AllSdkTest*"
diff --git a/.github/actions/normal-test-shard-run/action.yml b/.github/actions/test-shard-run/action.yml
index a037892f2..4d4582dce 100644
--- a/.github/actions/normal-test-shard-run/action.yml
+++ b/.github/actions/test-shard-run/action.yml
@@ -1,19 +1,29 @@
name: "Run tests"
author: "menny"
+
inputs:
index:
description: "zero-based index of the shard"
groups_count:
description: "count of groups"
default: 3
+ module:
+ default: ""
+ extra_args:
+ default: ""
runs:
using: "docker"
image: "docker://menny/ndk_ask:1.13.1"
env:
TERM: dumb
- GRADLE_OPTS: "-Dorg.gradle.daemon=false"
- TEST_GROUP_INDEX: ${{ inputs.index }}
- TEST_GROUPS_COUNT: ${{ inputs.groups_count }}
entrypoint: /bin/bash
args:
- - .github/actions/normal-test-shard-run/run_tests.sh
+ - .github/actions/test-shard-run/run_tests.sh
+ - ${{ inputs.groups_count }}
+ - ${{ inputs.index }}
+ - ${{ inputs.module }}
+ - ${{ inputs.extra_args }}
+
+branding:
+ icon: 'activity'
+ color: 'yellow'
diff --git a/.github/actions/test-shard-run/run_tests.sh b/.github/actions/test-shard-run/run_tests.sh
new file mode 100644
index 000000000..08871151c
--- /dev/null
+++ b/.github/actions/test-shard-run/run_tests.sh
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+
+export TEST_GROUPS_COUNT=${1}
+export TEST_GROUP_INDEX=${2}
+MODULE=${3}
+EXTRA_ARGS=${4}
+
+echo "Will run tests for module '${MODULE}' with extra args '${EXTRA_ARGS}' for group-index ${TEST_GROUP_INDEX} out of ${TEST_GROUPS_COUNT} groups:"
+
+./gradlew --stacktrace -Dorg.gradle.daemon=false ${MODULE}testDebugUnitTest ${MODULE}testDebugUnitTestCoverage ${EXTRA_ARGS}
diff --git a/.github/workflows/anysoftkeyboard.yml b/.github/workflows/anysoftkeyboard.yml
index 59d534037..31a75ecc4 100644
--- a/.github/workflows/anysoftkeyboard.yml
+++ b/.github/workflows/anysoftkeyboard.yml
@@ -65,29 +65,7 @@ jobs:
name: checks-reports
path: collected_reports/
- heavy-tests:
- needs: [setup]
- runs-on: ubuntu-18.04
- container: menny/ndk_ask:1.13.1
- steps:
- - uses: actions/checkout@v1
- with:
- fetch-depth: 1
- - name: tests
- run: |
- ./gradlew --stacktrace :app:testDebugUnitTest --tests="*AllSdkTest*" :app:testDebugUnitTestCoverage
- - uses: ./.github/actions/codecov
- - uses: ./.github/actions/collect-reports
- if: always()
- with:
- file_pattern: TEST-*.xml
- - uses: actions/upload-artifact@v1.0.0
- if: always()
- with:
- name: heavy-tests
- path: collected_reports/
-
- app-normal-tests-shards:
+ app-tests-shards:
needs: [setup]
runs-on: ubuntu-18.04
container: menny/ndk_ask:1.13.1
@@ -100,9 +78,10 @@ jobs:
with:
fetch-depth: 1
- name: tests
- uses: ./.github/actions/normal-test-shard-run
+ uses: ./.github/actions/test-shard-run
with:
index: ${{ matrix.index }}
+ module: "app:"
- uses: ./.github/actions/codecov
- uses: ./.github/actions/collect-reports
if: always()
@@ -111,10 +90,10 @@ jobs:
- uses: actions/upload-artifact@v1.0.0
if: always()
with:
- name: app-normal-tests_${{ matrix.index }}
+ name: app-tests_${{ matrix.index }}
path: collected_reports/
- non-app-normal-tests:
+ non-app-tests:
needs: [setup]
runs-on: ubuntu-18.04
container: menny/ndk_ask:1.13.1
@@ -123,8 +102,12 @@ jobs:
with:
fetch-depth: 1
- name: tests
- run: |
- ./gradlew --stacktrace testDebugUnitTest testDebugUnitTestCoverage -x app:testDebugUnitTest -x app:testDebugUnitTestCoverage
+ uses: ./.github/actions/test-shard-run
+ with:
+ index: 0
+ groups_count: 1
+ module: ""
+ extra_args: "-x app:testDebugUnitTest -x app:testDebugUnitTestCoverage"
- uses: ./.github/actions/codecov
- uses: ./.github/actions/collect-reports
if: always()
@@ -133,12 +116,12 @@ jobs:
- uses: actions/upload-artifact@v1.0.0
if: always()
with:
- name: non-app-normal-tests
+ name: non-app-tests
path: collected_reports/
pr_audit:
if: github.event_name == 'pull_request'
- needs: [checks, app-normal-tests-shards, heavy-tests, non-app-normal-tests]
+ needs: [checks, app-tests-shards, non-app-tests]
runs-on: ubuntu-18.04
steps:
- name: Success Message
@@ -146,7 +129,7 @@ jobs:
deploy:
if: github.event_name == 'push'
- needs: [checks, app-normal-tests-shards, heavy-tests, non-app-normal-tests]
+ needs: [checks, app-tests-shards, non-app-tests]
runs-on: ubuntu-18.04
container: menny/ndk_ask:1.13.1
steps: