From 60e3c193ffd0e89d340a27da29f071e00df5a95b Mon Sep 17 00:00:00 2001 From: Nikita Gryzlov Date: Tue, 26 May 2020 20:35:35 +0300 Subject: [PATCH 01/12] Create main.yml --- .github/workflows/main.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..50b1c0cc --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,28 @@ +name: CI + +on: + push: + pull_request: + +jobs: + build: + runs-on: onec-linux + + steps: + - uses: actions/checkout@v2 + + - name: Setup Onescript Action + uses: otymko/setup-onescript@v1.0 + with: + version: 1.4.0 + + # Runs a single command using the runners shell + - name: Install dependencies + run: | + opm install -l + opm install 1bdd 1testrunner coverage + + # Runs a set of commands using the runners shell + - name: Run tests + run: | + oscript ./tasks/coverage.os From ba3d0757165d5c7422cd989d74fedb02b38eacef Mon Sep 17 00:00:00 2001 From: Nikita Gryzlov Date: Fri, 29 May 2020 13:15:49 +0300 Subject: [PATCH 02/12] Update main.yml --- .github/workflows/main.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 50b1c0cc..6d3b1736 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,10 +11,8 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Setup Onescript Action - uses: otymko/setup-onescript@v1.0 - with: - version: 1.4.0 + - name: Setup Onescript + run: ovm use --install dev # Runs a single command using the runners shell - name: Install dependencies From 1d4f6c3e4a4cfda49bdfe380b78038f8e0bc7897 Mon Sep 17 00:00:00 2001 From: Nikita Gryzlov Date: Fri, 29 May 2020 13:18:13 +0300 Subject: [PATCH 03/12] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6d3b1736..55e806a3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,7 +12,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Onescript - run: ovm use --install dev + run: ovm use dev # Runs a single command using the runners shell - name: Install dependencies From 4b6dc7bbad0b4e3e0178eca3c040508992d498d5 Mon Sep 17 00:00:00 2001 From: Nikita Gryzlov Date: Fri, 29 May 2020 13:28:12 +0300 Subject: [PATCH 04/12] Update main.yml --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 55e806a3..c9c17227 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,8 +17,8 @@ jobs: # Runs a single command using the runners shell - name: Install dependencies run: | - opm install -l - opm install 1bdd 1testrunner coverage + opm install -l \ + && opm install 1bdd 1testrunner coverage # Runs a set of commands using the runners shell - name: Run tests From 793fcd1e2fa2d3004c48cf035a8a8ef6fecf6609 Mon Sep 17 00:00:00 2001 From: Nikita Gryzlov Date: Fri, 29 May 2020 13:31:13 +0300 Subject: [PATCH 05/12] Update main.yml --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c9c17227..c19829ea 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,8 +17,8 @@ jobs: # Runs a single command using the runners shell - name: Install dependencies run: | - opm install -l \ - && opm install 1bdd 1testrunner coverage + opm install -l + opm install -l 1bdd 1testrunner coverage # Runs a set of commands using the runners shell - name: Run tests From 0dcd403f5924e2fbdbfe5fb65a6af9d8fefb6b0d Mon Sep 17 00:00:00 2001 From: Nikita Gryzlov Date: Fri, 29 May 2020 13:34:02 +0300 Subject: [PATCH 06/12] Create oscript.cfg --- tasks/oscript.cfg | 1 + 1 file changed, 1 insertion(+) create mode 100644 tasks/oscript.cfg diff --git a/tasks/oscript.cfg b/tasks/oscript.cfg new file mode 100644 index 00000000..41016836 --- /dev/null +++ b/tasks/oscript.cfg @@ -0,0 +1 @@ +lib.additional=../oscript_modules From 58a30235d9013a02e9ea7f12827b223ced91bad3 Mon Sep 17 00:00:00 2001 From: Nikita Gryzlov Date: Fri, 29 May 2020 13:37:18 +0300 Subject: [PATCH 07/12] Update coverage.os --- tasks/coverage.os | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tasks/coverage.os b/tasks/coverage.os index b6299f02..4175c25e 100644 --- a/tasks/coverage.os +++ b/tasks/coverage.os @@ -3,10 +3,8 @@ #Использовать 1commands Функция ЭтоWindows() - Если ЭтоWindows = Неопределено Тогда - СистемнаяИнформация = Новый СистемнаяИнформация; - ЭтоWindows = Найти(НРег(СистемнаяИнформация.ВерсияОС), "windows") > 0; - КонецЕсли; + СистемнаяИнформация = Новый СистемнаяИнформация; + ЭтоWindows = Найти(НРег(СистемнаяИнформация.ВерсияОС), "windows") > 0; Возврат ЭтоWindows; КонецФункции @@ -41,4 +39,4 @@ .Clover(ИмяПакета) .Сформировать(); -ЗавершитьРаботу(КодВозврата); \ No newline at end of file +ЗавершитьРаботу(КодВозврата); From 21af39d8458a477902a1cb264fb8ba0c6787ee74 Mon Sep 17 00:00:00 2001 From: Nikita Gryzlov Date: Tue, 23 Jun 2020 13:04:23 +0300 Subject: [PATCH 08/12] =?UTF-8?q?=D0=92=D0=BE=D0=B7=D0=BC=D0=BE=D0=B6?= =?UTF-8?q?=D0=BD=D0=BE=D1=81=D1=82=D1=8C=20=D1=82=D0=B5=D1=81=D1=82=D0=B8?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F=20=D0=BF=D1=80=D0=B8?= =?UTF-8?q?=20=D0=BB=D0=BE=D0=BA=D0=B0=D0=BB=D1=8C=D0=BD=D0=BE=D0=B9=20?= =?UTF-8?q?=D1=83=D1=81=D1=82=D0=B0=D0=BD=D0=BE=D0=B2=D0=BA=D0=B5=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=B2=D0=B8=D1=81=D0=B8=D0=BC=D0=BE=D1=81=D1=82=D0=B5?= =?UTF-8?q?=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 10 +++++++++- build_packagedef | 12 ------------ 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c19829ea..2d1a327d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,6 +4,10 @@ on: push: pull_request: +env: + GIT_EMAIL: ci@mail + GIT_NAME: ci + jobs: build: runs-on: onec-linux @@ -13,7 +17,11 @@ jobs: - name: Setup Onescript run: ovm use dev - + + - name: Config env + run: | + git config --global user.name $GIT_EMAIL + git config --global user.email $GIT_NAME # Runs a single command using the runners shell - name: Install dependencies run: | diff --git a/build_packagedef b/build_packagedef index 6e766559..2400f523 100644 --- a/build_packagedef +++ b/build_packagedef @@ -32,18 +32,6 @@ КонецПроцедуры -Процедура ПослеСборки(Знач РабочийКаталог, Знач ПутьКФайлуПакета) Экспорт - - ПутьКФайлуНастройкиСкрипта = ОбъединитьПути(РабочийКаталог, "src", "cmd", "oscript.cfg"); - ФайлНастройкиСкрипта= Новый Файл(ПутьКФайлуНастройкиСкрипта); - Если ФайлНастройкиСкрипта.Существует() Тогда - УдалитьФайлы(ПутьКФайлуНастройкиСкрипта); - КонецЕсли; - - ФС.ОбеспечитьПустойКаталог(ОбъединитьПути(РабочийКаталог, "oscript_modules")); - -КонецПроцедуры - Описание.Имя("gitsync") .Версия("3.2.0") .ВерсияСреды("1.4.0") From 9eaa19893a8b7c57f77c26d7fafbd5c47fded69c Mon Sep 17 00:00:00 2001 From: Nikita Gryzlov Date: Tue, 23 Jun 2020 14:01:54 +0300 Subject: [PATCH 09/12] =?UTF-8?q?=D0=9F=D1=83=D0=B1=D0=BB=D0=B8=D0=BA?= =?UTF-8?q?=D0=B0=D1=86=D0=B8=D1=8F=20junit-=D1=80=D0=B5=D0=B7=D1=83=D0=BB?= =?UTF-8?q?=D1=8C=D1=82=D0=B0=D1=82=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2d1a327d..8a6a4d50 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,3 +32,9 @@ jobs: - name: Run tests run: | oscript ./tasks/coverage.os + + - uses: ashley-taylor/junit-report-annotations-action@v1.1 + if: always() + with: + access-token: ${{ secrets.GITHUB_TOKEN }} + path: bdd-log-*.xml \ No newline at end of file From 20b2d961ca0f751dce5596ff684f1fd3ba32e44f Mon Sep 17 00:00:00 2001 From: Nikita Gryzlov Date: Tue, 23 Jun 2020 14:15:24 +0300 Subject: [PATCH 10/12] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B0=D0=BF=D0=B8=20coverage-=D0=B1?= =?UTF-8?q?=D0=B8=D0=B1=D0=BB=D0=B8=D0=BE=D1=82=D0=B5=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tasks/coverage.os | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/coverage.os b/tasks/coverage.os index 4175c25e..3f088138 100644 --- a/tasks/coverage.os +++ b/tasks/coverage.os @@ -33,7 +33,7 @@ ПроцессорГенерации = Новый ГенераторОтчетаПокрытия(); ПроцессорГенерации.ОтносительныеПути() - .ФайлСтатистики(Файл_Стат.ПолноеИмя) + .ИмяФайлаСтатистики() .GenericCoverage() .Cobertura() .Clover(ИмяПакета) From 54cc3c6a42302db3cf48ffba318078d031052be5 Mon Sep 17 00:00:00 2001 From: Nikita Gryzlov Date: Tue, 23 Jun 2020 14:20:39 +0300 Subject: [PATCH 11/12] Fix version --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8a6a4d50..4958e0e2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,7 +33,7 @@ jobs: run: | oscript ./tasks/coverage.os - - uses: ashley-taylor/junit-report-annotations-action@v1.1 + - uses: ashley-taylor/junit-report-annotations-action@1.1 if: always() with: access-token: ${{ secrets.GITHUB_TOKEN }} From f9abb7e7f34c3444eacbf50e9c03ed8156d17fb4 Mon Sep 17 00:00:00 2001 From: Nikita Gryzlov Date: Tue, 23 Jun 2020 14:34:16 +0300 Subject: [PATCH 12/12] codecov --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4958e0e2..42886fc7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,9 +32,9 @@ jobs: - name: Run tests run: | oscript ./tasks/coverage.os - - - uses: ashley-taylor/junit-report-annotations-action@1.1 + + - name: Codecov + uses: codecov/codecov-action@v1.0.7 if: always() with: - access-token: ${{ secrets.GITHUB_TOKEN }} - path: bdd-log-*.xml \ No newline at end of file + file: ./coverage/coverage.xml \ No newline at end of file