{"id":298621,"date":"2020-02-13T09:00:24","date_gmt":"2020-02-13T09:00:24","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=298621"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=298621","title":{"rendered":"\u041f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u043c CI \u043d\u0430 github \u0434\u043b\u044f Android \u0437\u0430 \u0434\u0435\u043d\u044c"},"content":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/488134\/\">\u041f\u0440\u0438\u0432\u0435\u0442! <\/p>\n<p>  \u0421 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435\u043c <a href=\"https:\/\/github.com\/features\/actions\">Github Actions<\/a> \u043f\u0440\u043e\u044f\u0432\u0438\u043b \u0438\u043d\u0438\u0446\u0438\u0430\u0442\u0438\u0432\u0443 \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043b \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0438\u0439 (\u043d\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439) <b>CI\/CD<\/b> \u0432 \u043d\u0430\u0448 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439, \u043d\u043e \u0443\u0436\u0435 \u043a\u0430\u043a 2 \u0433\u043e\u0434\u0430 \u0436\u0438\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 <a href=\"https:\/\/flowwow.com\/\">Flowwow<\/a>.<\/p>\n<p>  <b>\u0417\u0430\u0447\u0435\u043c? <\/b><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ym\/-3\/9q\/ym-39queudi6jx5otizngpw3ooq.jpeg\"><\/p>\n<p>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u044e\u0442 \u043e\u0448\u0438\u0431\u043e\u043a, \u043d\u043e \u0432\u043e\u0442 \u044f \u2014 \u043d\u0435 \u0438\u0437 \u0442\u0430\u043a\u0438\u0445, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0437\u0440\u0435\u0434\u043a\u0430, \u043d\u043e \u0441\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a\u0438\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0432\u0441\u043f\u043b\u0435\u0441\u043a\u0438 \u043a\u0440\u0430\u0448\u0435\u0439 \u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0441\u0440\u043e\u0447\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0432\u044b\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0441 \u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u043b\u0438\u0431\u043e \u043e\u0442\u043a\u0430\u0442\u043e\u043c \u043a \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438. \u041d\u043e \u0442\u0435 \u0447\u0430\u0441\u044b-\u0434\u043d\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043d\u0430\u0442\u044b\u043a\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0432\u044b\u043b\u0435\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0431\u0435\u0437 \u0441\u043b\u0435\u0434\u043e\u0432 \u043d\u0435 \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u043a\u0430\u043a \u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0442\u0430\u043a \u0438 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430. <\/p>\n<p>  \u041a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u043a\u0430\u043f\u044b \u043d\u0430 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435, \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043d\u0438\u0436\u0435.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u041e\u0442\u0447\u0435\u0433\u043e \u0436\u0435 \u043b\u0438\u0447\u043d\u043e \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u0432\u0430\u044e\u0442 \u0442\u0430\u043a\u0438\u0435 \u0444\u0430\u043a\u0430\u043f\u044b?<\/p>\n<ol>\n<li> \u041d\u0435\u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0443\u0447\u0430\u0441\u0442\u043e\u043a \u043a\u043e\u0434\u0430 <\/li>\n<li> \u0417\u0430\u0432\u0435\u0437\u043b\u0438 \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0438 \u043e\u043d\u0430 \u0441\u0438\u0442\u0443\u0430\u0442\u0438\u0432\u043d\u043e \u043a\u0440\u0430\u0448\u0438\u0442 <\/li>\n<li> \u041e\u0431\u043d\u043e\u0432\u0438\u043b\u0438 \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 (\u043e\u0431\u044b\u0447\u043d\u043e, \u044d\u0442\u043e \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430) \u043d\u0430 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e <\/li>\n<\/ol>\n<p>  \u0421 1 \u043f\u0443\u043d\u043a\u0442\u043e\u043c \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0433\u0443\u0442 code review, Unit \u0442\u0435\u0441\u0442\u044b, \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u043a\u043e\u0434\u0430, UI \u0442\u0435\u0441\u0442\u044b, \u0440\u0443\u0447\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<p>  \u0421\u043e 2-3 \u043f\u0443\u043d\u043a\u0442\u0430\u043c\u0438 \u2014 \u0442\u043e\u043b\u044c\u043a\u043e UI \u0442\u0435\u0441\u0442\u044b \u0438 \u0440\u0443\u0447\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<p>  <i>\u041e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/i> \u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0432\u044b\u0431\u043e\u0440 \u043f\u0430\u043b \u043d\u0430 \u0442\u043e\u0433\u0434\u0430 \u0435\u0449\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u044f\u0432\u0438\u0432\u0448\u0438\u0439\u0441\u044f <a href=\"https:\/\/github.com\/features\/actions\">Github Actions<\/a>, \u0431\u043b\u0430\u0433\u043e \u0438 \u043a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 Github. \u0421\u0440\u0430\u0437\u0443 \u0441\u043a\u0430\u0436\u0443, \u0434\u043b\u044f free \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 github \u0434\u0430\u0435\u0442\u0441\u044f \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0445 2,000 Action \u043c\u0438\u043d\u0443\u0442 \u0432 \u043c\u0435\u0441\u044f\u0446.<\/p>\n<h3>C \u0447\u0435\u0433\u043e \u043d\u0430\u0447\u0430\u0442\u044c? <\/h3>\n<p>  <a href=\"https:\/\/github.com\/marketplace?type=actions\">\u0417\u0434\u0435\u0441\u044c <\/a>\u043f\u043e\u043b\u043d\u043e \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432. \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u0430 \u0448\u0442\u0443\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b\u0438\u043a <a href=\"https:\/\/ru.wikipedia.org\/wiki\/YAML\">YAML<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/9q\/xg\/xy\/9qxgxyxar7ecu-yh37n4lvv_yo8.png\"><\/p>\n<p>  \u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f Android:<\/p>\n<pre><code class=\"xml\">name: Android CI  on: [push]  jobs:   build:     runs-on: ubuntu-latest     steps:       - uses: actions\/checkout@v1       - name: set up JDK 1.8         uses: actions\/setup-java@v1         with:           java-version: 1.8       - name: Build with Gradle         run: .\/gradlew assembleDebug <\/code><\/pre>\n<p>  \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435: \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 push \u0432 \u043b\u044e\u0431\u0443\u044e \u0432\u0435\u0442\u043a\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u0434\u0430\u0447\u0430 (job) <a href=\"https:\/\/help.github.com\/en\/actions\/reference\/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources\">\u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 github<\/a> \u0441 \u041e\u0421 ubuntu. \u0428\u0430\u0433\u0438 \u0437\u0430\u0434\u0430\u0447\u0438: checkout \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 jdk, \u0437\u0430\u043f\u0443\u0441\u043a gradle \u0437\u0430\u0434\u0430\u0447\u0438 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438. <\/p>\n<p>  \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043a\u0430\u043a\u043e\u0433\u043e \u043b\u0438\u0431\u043e \u0448\u0430\u0433\u0430 \u0443\u0432\u0438\u0434\u0438\u043c \u0442\u0430\u043a\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u0443<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/x5\/5n\/tm\/x55ntmc7nahi-txe0xjwaeq2wfu.png\"><\/p>\n<p>  \u0442\u0430\u043c \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043b\u043e\u0433\u0438.<\/p>\n<p>  \u0423\u0434\u043e\u0431\u043d\u043e, \u0447\u0442\u043e \u043f\u0440\u0438 Pull Request \u043d\u0430\u043c \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043a\u0430\u0436\u0443\u0442, \u0447\u0442\u043e \u043d\u0430\u0448\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u0447\u043d\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0444\u0435\u0439\u043b\u0438\u043b\u0430\u0441\u044c<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ul\/--\/wv\/ul--wvsu3ywhy_q88fas2-xhrie.png\"><\/p>\n<p>  \u0410 \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f github \u0441\u043e Slack, \u0442\u043e \u0435\u0449\u0435 \u0438 \u0442\u0430\u043a<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/tu\/ir\/jb\/tuirjbi1t37uhrh4ejxzy1b7t7s.png\"><\/p>\n<h3>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e \u043f\u0443\u043d\u043a\u0442\u0430\u043c<\/h3>\n<p>  <b>1. Unit tests<\/b><\/p>\n<p>  \u0412\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 Unit \u0442\u0435\u0441\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f junit, mockito, etc.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0430\u0448\u0438 \u0442\u0435\u0441\u0442\u044b \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 gradle \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<pre><code class=\"xml\">- name: Run some unit tests   run: .\/gradlew testStageDebugUnitTest <\/code><\/pre>\n<p>  <b>2. \u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u043a\u043e\u0434\u0430<\/b><\/p>\n<p>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u043b\u0438\u043d\u0442\u0435\u0440\u044b (<a href=\"https:\/\/github.com\/arturbosch\/detekt\">detekt<\/a> \u2014 \u0434\u043b\u044f kotlin, <a href=\"https:\/\/docs.gradle.org\/current\/userguide\/pmd_plugin.html\">pmd<\/a> \u2014 \u0434\u043b\u044f java).<br \/>  \u0418\u043b\u0438 \u0436\u0435 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 <a href=\"https:\/\/www.sonarqube.org\/\">sonarqube<\/a>.<\/p>\n<p>  \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043b\u0438\u043d\u0442\u0435\u0440\u043e\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443 \u043d\u0430\u0441 \u0438 java, \u0438 kotlin):<\/p>\n<pre><code class=\"plaintext\">task(&quot;checkAll&quot;) {     group &quot;Verify&quot;     description &quot;Runs all static checks on the build&quot;     dependsOn &quot;pmd&quot;, &quot;detekt&quot; } <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"xml\">- name: Run some unit tests   run: .\/gradlew checkAll <\/code><\/pre>\n<p>  \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 <b>sonarqube<\/b> \u2014 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u2014 <a href=\"https:\/\/medium.com\/@wkrzywiec\/write-better-code-with-sonarqube-5e9aa4a11fe6\">\u0437\u0434\u0435\u0441\u044c<\/a><\/p>\n<pre><code class=\"xml\">- uses: actions\/checkout@v1 - name: SonarCloud Scan    run: .\/gradlew jacocoUnitTestReport sonarqube -Dsonar.login=${{ secrets.SONAR_TOKEN }} --stacktrace    env:      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Link to SonarCloud Report    run: echo &quot;https:\/\/sonarcloud.io\/dashboard?id=..&quot; <\/code><\/pre>\n<p>  <b>3. UI \u0442\u0435\u0441\u0442\u044b<\/b><\/p>\n<p>  \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 UI \u0442\u0435\u0441\u0442\u0430 \u2014 \u043f\u043b\u043e\u0434 \u0432\u0430\u0448\u0435\u0439 \u0444\u0430\u043d\u0442\u0430\u0437\u0438\u0438, \u043c\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u2014 \u043e\u0434\u0438\u043d \u00abSmoke\u00bb \u0442\u0435\u0441\u0442, \u0438\u043c\u0438\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u2014 \u0437\u0430\u0439\u0442\u0438, \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u043e\u0432\u0430\u0440, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0430\u043a\u0430\u0437, \u043e\u0442\u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430\u043a\u0430\u0437. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c UIAutomator, Espresso, Kaspresso.<\/p>\n<p>  \u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0437\u0434\u0435\u0441\u044c \u0442\u043e\u0436\u0435 2 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u2014 \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 github \u0438\u043b\u0438 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <a href=\"https:\/\/firebase.google.com\/docs\/test-lab\">Firebase Test Lab<\/a><br \/>  \u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 github \u0435\u0441\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438: <a href=\"https:\/\/github.com\/ReactiveCircus\/android-emulator-runner\">\u0440\u0430\u0437<\/a> \u0438 <a href=\"https:\/\/github.com\/faruktoptas\/android-github-actions-emulator\">\u0434\u0432\u0430<\/a>.<\/p>\n<p>  \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 Firebase Test Lab, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 Google Cloud Platform \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/firebase.google.com\/docs\/test-lab\/android\/command-line\">gcloud CLI<\/a><\/p>\n<pre><code class=\"xml\">- name: prepare gcloud   uses: GoogleCloudPlatform\/github-actions\/setup-gcloud@master   with:     version: latest     service_account_email:  ${{ secrets.SA_EMAIL }}     service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - name: gcloud Set up project   run: |     gcloud config set project ${{ secrets.PROJECT_ID }} - name: Assemble apks for smoke test   run: .\/gradlew Smoke - name: Run tests in test lab   run: |      gcloud firebase test android run \\        --app app\/build\/outputs\/apk\/production\/debug\/app.apk \\        --test app\/build\/outputs\/apk\/androidTest\/production\/debug\/appTest.apk \\        --device model=Nexus6P,version=25,orientation=portrait,locale=en_US \\        --device model=athene,version=23,orientation=portrait,locale=en_US \\        --device model=sailfish,version=26,orientation=portrait,locale=en_US <\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 Firebase, \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432 Google Cloud \u0421onsole \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u0441 \u0430\u0434\u043c\u0438\u043d \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 json \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432 base64 \u0432 <a href=\"https:\/\/help.github.com\/en\/actions\/configuring-and-managing-workflows\/creating-and-storing-encrypted-secrets\">github secrets<\/a> \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 <b>gcloud<\/b>.<\/p>\n<p>  \u041e\u0431\u0449\u0438\u0439 \u043a\u043e\u043d\u0444\u0438\u0433 \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b \u0442\u0430\u043a. \u0417\u0430\u0434\u0430\u0447\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044e <b>PR \u0432 master<\/b><\/p>\n<pre><code class=\"xml\">name: Android CI  on:   pull_request:     branches:       - 'master'  jobs:   build:      runs-on: ubuntu-latest      steps:       - uses: actions\/checkout@v1       - name: set up JDK 1.8         uses: actions\/setup-java@v1         with:           java-version: 1.8       - name: Run static checks         run: .\/gradlew checkAll       - name: Run some unit tests         run: .\/gradlew testStageDebugUnitTest        - name: prepare gcloud         uses: GoogleCloudPlatform\/github-actions\/setup-gcloud@master         with:           version: latest           service_account_email:  ${{ secrets.SA_EMAIL }}           service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}       - name: gcloud Set up project         run: |           gcloud config set project ${{ secrets.PROJECT_ID }}       - name: Assemble apks for smoke test         run: .\/gradlew Smoke       - name: Run tests in test lab         run: |           gcloud firebase test android run \\             --app app\/build\/outputs\/apk\/production\/debug\/app.apk \\             --test app\/build\/outputs\/apk\/androidTest\/production\/debug\/appTest.apk \\             --device model=Nexus6P,version=25,orientation=portrait,locale=en_US \\             --device model=athene,version=23,orientation=portrait,locale=en_US \\             --device model=sailfish,version=26,orientation=portrait,locale=en_US <\/code><\/pre>\n<p>  \u0412\u0440\u043e\u0434\u0435, \u043f\u0440\u043e\u0441\u0442\u043e. \u042d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u0438 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b \u043a\u043e\u0434-\u0430\u043d\u0430\u043b\u0438\u0437\u0430. \u041c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 (job) \u0434\u043b\u044f \u0438\u0445 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430. \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0441\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e. \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 15 \u043c\u0438\u043d\u0443\u0442 \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 (\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 github 2-core CPU, 7 GB RAM, 14 GB of SSD), \u043d\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043d\u0435 \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e, \u0442\u043a \u043f\u043e\u043a\u0430 \u00ab\u043a\u043e\u0434\u0440\u0435\u0432\u044c\u044e\u0438\u0448\u044c\u00bb \u0433\u043b\u0430\u0437\u0430\u043c\u0438, \u043f\u043e\u0434\u044a\u0435\u0437\u0436\u0430\u044e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0438 \u044d\u0442\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<p>  \u0411\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u044b\u0440\u0443\u0447\u0430\u044e\u0442 UI \u0442\u0435\u0441\u0442\u044b \u2014 \u0431\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0438\u0445 \u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043a\u0440\u0430\u0448\u0438\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430 \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u0442\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0448\u044c, \u0447\u0442\u043e \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0435\u0451 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c.<\/p>\n<p>  \u0427\u0435\u0440\u0435\u0437 gcloud \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0431\u0438\u043b\u0434\u044b \u0432 Firebase App Distribution, \u0440\u0435\u043b\u0438\u0437\u0438\u0442\u044c \u0432 Google Play, etc.<\/p>\n<p>  \u041c\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/medium.com\/@wkrzywiec\">\u0442\u0443\u0442<\/a> \u0438 <a href=\"https:\/\/github.com\/marketplace?type=actions&amp;query=android\">\u0442\u0443\u0442<\/a>.<br \/>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0441\u0442\u0430\u0442\u044c\u044f \u043a\u043e\u043c\u0443-\u043d\u0438\u0431\u0443\u0434\u044c \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u0430. \u0423\u0434\u0430\u0447\u0438 \u0438 \u043c\u0435\u043d\u044c\u0448\u0435 \u043a\u0440\u0430\u0448\u0435\u0439 \u043d\u0430 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435!<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/488134\/\"> https:\/\/habr.com\/ru\/post\/488134\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/488134\/\">\u041f\u0440\u0438\u0432\u0435\u0442! <\/p>\n<p>  \u0421 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435\u043c <a href=\"https:\/\/github.com\/features\/actions\">Github Actions<\/a> \u043f\u0440\u043e\u044f\u0432\u0438\u043b \u0438\u043d\u0438\u0446\u0438\u0430\u0442\u0438\u0432\u0443 \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043b \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0438\u0439 (\u043d\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439) <b>CI\/CD<\/b> \u0432 \u043d\u0430\u0448 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439, \u043d\u043e \u0443\u0436\u0435 \u043a\u0430\u043a 2 \u0433\u043e\u0434\u0430 \u0436\u0438\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 <a href=\"https:\/\/flowwow.com\/\">Flowwow<\/a>.<\/p>\n<p>  <b>\u0417\u0430\u0447\u0435\u043c? <\/b><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ym\/-3\/9q\/ym-39queudi6jx5otizngpw3ooq.jpeg\"><\/p>\n<p>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u044e\u0442 \u043e\u0448\u0438\u0431\u043e\u043a, \u043d\u043e \u0432\u043e\u0442 \u044f \u2014 \u043d\u0435 \u0438\u0437 \u0442\u0430\u043a\u0438\u0445, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0437\u0440\u0435\u0434\u043a\u0430, \u043d\u043e \u0441\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a\u0438\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0432\u0441\u043f\u043b\u0435\u0441\u043a\u0438 \u043a\u0440\u0430\u0448\u0435\u0439 \u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0441\u0440\u043e\u0447\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0432\u044b\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0441 \u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u043b\u0438\u0431\u043e \u043e\u0442\u043a\u0430\u0442\u043e\u043c \u043a \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438. \u041d\u043e \u0442\u0435 \u0447\u0430\u0441\u044b-\u0434\u043d\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043d\u0430\u0442\u044b\u043a\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0432\u044b\u043b\u0435\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0431\u0435\u0437 \u0441\u043b\u0435\u0434\u043e\u0432 \u043d\u0435 \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u043a\u0430\u043a \u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0442\u0430\u043a \u0438 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430. <\/p>\n<p>  \u041a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u043a\u0430\u043f\u044b \u043d\u0430 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435, \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043d\u0438\u0436\u0435.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-298621","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/298621","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=298621"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/298621\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=298621"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=298621"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=298621"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}