diff --git a/.github/workflows/oint_test_Airtable.yml b/.github/workflows/oint_test_Airtable.yml new file mode 100644 index 0000000000..f6580179a9 --- /dev/null +++ b/.github/workflows/oint_test_Airtable.yml @@ -0,0 +1,125 @@ + +name: OINT | Тестирование Airtable + +# Controls when the workflow will run +on: + workflow_dispatch: + +jobs: + + Decode: + runs-on: ubuntu-latest + if: ${{ always() }} + steps: + + - uses: actions/checkout@v4 + + - name: Расшифровать тестовые данные + run: gpg --quiet --batch --yes --decrypt --passphrase="$ENC_JSON" --output ./data.json ./data.json.gpg + env: + ENC_JSON: ${{ secrets.ENC_JSON }} + - name: Записать тестовые данные в кэш + uses: actions/cache/save@v3 + with: + key: test-data + path: ./data.json + + Build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + - name: Записать артефакт + uses: actions/upload-artifact@v4 + with: + name: oint + path: ./OInt/*.ospx + + + Testing-Airtable: + runs-on: ubuntu-latest + needs: [Decode, Build] + steps: + + - uses: actions/checkout@v2 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Получить тестовые данные из кэша + uses: actions/cache/restore@v3 + with: + key: test-data + path: ./data.json + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + + + - name: Создать/Изменить базу + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "АТ_СоздатьБазу" + + - name: Создать/Изменить таблицу + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "АТ_СоздатьТаблицу" + + - name: Создать/Изменить поле + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "АТ_СоздатьПоле" + + + Clear-Cache: + runs-on: ubuntu-latest + needs: [Testing-Telegram, Testing-VK, Testing-Viber, Testing-Twitter, Testing-YandexDisk, Testing-GoogleWorkspace, Testing-GoogleCalendar, Testing-GoogleDrive, Testing-GoogleSheets, Testing-Notion, Testing-Slack, Testing-Airtable, Testing-Telegram, Testing-VK, Testing-Viber, Testing-Twitter, Testing-YandexDisk, Testing-GoogleWorkspace, Testing-GoogleCalendar, Testing-GoogleDrive, Testing-GoogleSheets, Testing-Notion, Testing-Slack, Testing-Airtable, Encode] + if: ${{ always() }} + steps: + - name: Очистка основного кэша + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data" + + - name: Очистка кэша Google + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data_google" + + - name: Очистка кэша Twitter + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data_new" diff --git a/.github/workflows/oint_test_GoogleCalendar.yml b/.github/workflows/oint_test_GoogleCalendar.yml new file mode 100644 index 0000000000..5ce8c28c89 --- /dev/null +++ b/.github/workflows/oint_test_GoogleCalendar.yml @@ -0,0 +1,129 @@ + +name: OINT | Тестирование GoogleCalendar + +# Controls when the workflow will run +on: + workflow_dispatch: + +jobs: + + Decode: + runs-on: ubuntu-latest + if: ${{ always() }} + steps: + + - uses: actions/checkout@v4 + + - name: Расшифровать тестовые данные + run: gpg --quiet --batch --yes --decrypt --passphrase="$ENC_JSON" --output ./data.json ./data.json.gpg + env: + ENC_JSON: ${{ secrets.ENC_JSON }} + - name: Записать тестовые данные в кэш + uses: actions/cache/save@v3 + with: + key: test-data + path: ./data.json + + Build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + - name: Записать артефакт + uses: actions/upload-artifact@v4 + with: + name: oint + path: ./OInt/*.ospx + + + Testing-GoogleCalendar: + runs-on: ubuntu-latest + needs: Testing-GoogleWorkspace + steps: + + - uses: actions/checkout@v2 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Получить тестовые данные из кэша + uses: actions/cache/restore@v3 + with: + key: test-data_google + path: ./data.json + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + + + - name: Получить список календарей + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ГК_ПолучитьСписокКалендарей" + + - name: Создать/Удалить календарь + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ГК_СоздатьУдалитьКалендарь" + + - name: Создать/Удалить событие + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ГК_СоздатьУдалитьСобытие" + + - name: Получить список событий + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ГК_ПолучитьСписокСобытий" + + + Clear-Cache: + runs-on: ubuntu-latest + needs: [Testing-Telegram, Testing-VK, Testing-Viber, Testing-Twitter, Testing-YandexDisk, Testing-GoogleWorkspace, Testing-GoogleCalendar, Testing-GoogleDrive, Testing-GoogleSheets, Testing-Notion, Testing-Slack, Testing-Airtable, Testing-Telegram, Testing-VK, Testing-Viber, Testing-Twitter, Testing-YandexDisk, Testing-GoogleWorkspace, Testing-GoogleCalendar, Encode] + if: ${{ always() }} + steps: + - name: Очистка основного кэша + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data" + + - name: Очистка кэша Google + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data_google" + + - name: Очистка кэша Twitter + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data_new" diff --git a/.github/workflows/oint_test_GoogleDrive.yml b/.github/workflows/oint_test_GoogleDrive.yml new file mode 100644 index 0000000000..299dbd6f5a --- /dev/null +++ b/.github/workflows/oint_test_GoogleDrive.yml @@ -0,0 +1,129 @@ + +name: OINT | Тестирование GoogleDrive + +# Controls when the workflow will run +on: + workflow_dispatch: + +jobs: + + Decode: + runs-on: ubuntu-latest + if: ${{ always() }} + steps: + + - uses: actions/checkout@v4 + + - name: Расшифровать тестовые данные + run: gpg --quiet --batch --yes --decrypt --passphrase="$ENC_JSON" --output ./data.json ./data.json.gpg + env: + ENC_JSON: ${{ secrets.ENC_JSON }} + - name: Записать тестовые данные в кэш + uses: actions/cache/save@v3 + with: + key: test-data + path: ./data.json + + Build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + - name: Записать артефакт + uses: actions/upload-artifact@v4 + with: + name: oint + path: ./OInt/*.ospx + + + Testing-GoogleDrive: + runs-on: ubuntu-latest + needs: Testing-GoogleWorkspace + steps: + + - uses: actions/checkout@v2 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Получить тестовые данные из кэша + uses: actions/cache/restore@v3 + with: + key: test-data_google + path: ./data.json + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + + + - name: Получить список каталогов + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ГД_ПолучитьСписокКаталогов" + + - name: Загрузить/Удалить Файл + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ГД_ЗагрузитьУдалитьФайл" + + - name: Создать/Удалить кооментарий + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ГД_СоздатьУдалитьКомментарий" + + - name: Создать/Удалить каталог + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ГД_СоздатьКаталог" + + + Clear-Cache: + runs-on: ubuntu-latest + needs: [Testing-Telegram, Testing-VK, Testing-Viber, Testing-Twitter, Testing-YandexDisk, Testing-GoogleWorkspace, Testing-GoogleCalendar, Testing-GoogleDrive, Testing-GoogleSheets, Testing-Notion, Testing-Slack, Testing-Airtable, Testing-Telegram, Testing-VK, Testing-Viber, Testing-Twitter, Testing-YandexDisk, Testing-GoogleWorkspace, Testing-GoogleCalendar, Testing-GoogleDrive, Encode] + if: ${{ always() }} + steps: + - name: Очистка основного кэша + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data" + + - name: Очистка кэша Google + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data_google" + + - name: Очистка кэша Twitter + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data_new" diff --git a/.github/workflows/oint_test_GoogleSheets.yml b/.github/workflows/oint_test_GoogleSheets.yml new file mode 100644 index 0000000000..8a7657eb06 --- /dev/null +++ b/.github/workflows/oint_test_GoogleSheets.yml @@ -0,0 +1,125 @@ + +name: OINT | Тестирование GoogleSheets + +# Controls when the workflow will run +on: + workflow_dispatch: + +jobs: + + Decode: + runs-on: ubuntu-latest + if: ${{ always() }} + steps: + + - uses: actions/checkout@v4 + + - name: Расшифровать тестовые данные + run: gpg --quiet --batch --yes --decrypt --passphrase="$ENC_JSON" --output ./data.json ./data.json.gpg + env: + ENC_JSON: ${{ secrets.ENC_JSON }} + - name: Записать тестовые данные в кэш + uses: actions/cache/save@v3 + with: + key: test-data + path: ./data.json + + Build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + - name: Записать артефакт + uses: actions/upload-artifact@v4 + with: + name: oint + path: ./OInt/*.ospx + + + Testing-GoogleSheets: + runs-on: ubuntu-latest + needs: Testing-GoogleWorkspace + steps: + + - uses: actions/checkout@v2 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Получить тестовые данные из кэша + uses: actions/cache/restore@v3 + with: + key: test-data_google + path: ./data.json + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + + + - name: Создать таблицу + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ГТ_СоздатьТаблицу" + + - name: Получить таблицу + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ГТ_ПолучитьТаблицу" + + - name: Заполнить/Очистить ячейки + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ГТ_ЗаполнитьОчиститьЯчейки" + + + Clear-Cache: + runs-on: ubuntu-latest + needs: [Testing-Telegram, Testing-VK, Testing-Viber, Testing-Twitter, Testing-YandexDisk, Testing-GoogleWorkspace, Testing-GoogleCalendar, Testing-GoogleDrive, Testing-GoogleSheets, Testing-Notion, Testing-Slack, Testing-Airtable, Testing-Telegram, Testing-VK, Testing-Viber, Testing-Twitter, Testing-YandexDisk, Testing-GoogleWorkspace, Testing-GoogleCalendar, Testing-GoogleDrive, Testing-GoogleSheets, Encode] + if: ${{ always() }} + steps: + - name: Очистка основного кэша + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data" + + - name: Очистка кэша Google + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data_google" + + - name: Очистка кэша Twitter + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data_new" diff --git a/.github/workflows/oint_test_GoogleWorkspace.yml b/.github/workflows/oint_test_GoogleWorkspace.yml new file mode 100644 index 0000000000..043f607814 --- /dev/null +++ b/.github/workflows/oint_test_GoogleWorkspace.yml @@ -0,0 +1,132 @@ + +name: OINT | Тестирование GoogleWorkspace + +# Controls when the workflow will run +on: + workflow_dispatch: + +jobs: + + Decode: + runs-on: ubuntu-latest + if: ${{ always() }} + steps: + + - uses: actions/checkout@v4 + + - name: Расшифровать тестовые данные + run: gpg --quiet --batch --yes --decrypt --passphrase="$ENC_JSON" --output ./data.json ./data.json.gpg + env: + ENC_JSON: ${{ secrets.ENC_JSON }} + - name: Записать тестовые данные в кэш + uses: actions/cache/save@v3 + with: + key: test-data + path: ./data.json + + Build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + - name: Записать артефакт + uses: actions/upload-artifact@v4 + with: + name: oint + path: ./OInt/*.ospx + + + Testing-GoogleWorkspace: + runs-on: ubuntu-latest + needs: [Decode, Build] + steps: + + - uses: actions/checkout@v2 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Получить тестовые данные из кэша + uses: actions/cache/restore@v3 + with: + key: test-data + path: ./data.json + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + + + - name: Получить ссылку авторизации + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ГВ_ПолучитьСсылкуАвторизации" + + - name: Получить токен + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ГВ_ПолучитьТокен" + + - name: Обновить токен + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ГВ_ОбновитьТокен" + + - name: Записать измененные данные + if: ${{ cancelled() }} == false + uses: actions/cache/save@v3 + with: + key: test-data_google + path: ./data.json + + + Clear-Cache: + runs-on: ubuntu-latest + needs: [Testing-Telegram, Testing-VK, Testing-Viber, Testing-Twitter, Testing-YandexDisk, Testing-GoogleWorkspace, Testing-GoogleCalendar, Testing-GoogleDrive, Testing-GoogleSheets, Testing-Notion, Testing-Slack, Testing-Airtable, Testing-Telegram, Testing-VK, Testing-Viber, Testing-Twitter, Testing-YandexDisk, Testing-GoogleWorkspace, Encode] + if: ${{ always() }} + steps: + - name: Очистка основного кэша + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data" + + - name: Очистка кэша Google + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data_google" + + - name: Очистка кэша Twitter + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data_new" diff --git a/.github/workflows/oint_test_Notion.yml b/.github/workflows/oint_test_Notion.yml new file mode 100644 index 0000000000..5d64681d1c --- /dev/null +++ b/.github/workflows/oint_test_Notion.yml @@ -0,0 +1,149 @@ + +name: OINT | Тестирование Notion + +# Controls when the workflow will run +on: + workflow_dispatch: + +jobs: + + Decode: + runs-on: ubuntu-latest + if: ${{ always() }} + steps: + + - uses: actions/checkout@v4 + + - name: Расшифровать тестовые данные + run: gpg --quiet --batch --yes --decrypt --passphrase="$ENC_JSON" --output ./data.json ./data.json.gpg + env: + ENC_JSON: ${{ secrets.ENC_JSON }} + - name: Записать тестовые данные в кэш + uses: actions/cache/save@v3 + with: + key: test-data + path: ./data.json + + Build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + - name: Записать артефакт + uses: actions/upload-artifact@v4 + with: + name: oint + path: ./OInt/*.ospx + + + Testing-Notion: + runs-on: ubuntu-latest + needs: [Decode, Build] + steps: + + - uses: actions/checkout@v2 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Получить тестовые данные из кэша + uses: actions/cache/restore@v3 + with: + key: test-data + path: ./data.json + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + + + - name: Создать страницу + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Ноушн_СоздатьСтраницу" + + - name: Создать/Изменить базу + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Ноушн_СоздатьИзменитьБазу" + + - name: Получить информацию о странице + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Ноушн_ПолучитьИнформациюОСтранице" + + - name: Получить информацию о базе + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Ноушн_ПолучитьИнформациюОБазе" + + - name: Создать страницу в базу + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Ноушн_СоздатьСтраницуВБазу" + + - name: Изменить свойства страницы + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Ноушн_ИзменитьСвойстваСтраницы" + + - name: Создать/Удалить блок + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Ноушн_СоздатьУдалитьБлок" + + - name: Получить пользователей + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Ноушн_ПолучитьПользователей" + + - name: Получить данные пользователя + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Ноушн_ПолучитьДанныеПользователя" + + + Clear-Cache: + runs-on: ubuntu-latest + needs: [Testing-Telegram, Testing-VK, Testing-Viber, Testing-Twitter, Testing-YandexDisk, Testing-GoogleWorkspace, Testing-GoogleCalendar, Testing-GoogleDrive, Testing-GoogleSheets, Testing-Notion, Testing-Slack, Testing-Airtable, Testing-Telegram, Testing-VK, Testing-Viber, Testing-Twitter, Testing-YandexDisk, Testing-GoogleWorkspace, Testing-GoogleCalendar, Testing-GoogleDrive, Testing-GoogleSheets, Testing-Notion, Encode] + if: ${{ always() }} + steps: + - name: Очистка основного кэша + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data" + + - name: Очистка кэша Google + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data_google" + + - name: Очистка кэша Twitter + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data_new" diff --git a/.github/workflows/oint_test_Slack.yml b/.github/workflows/oint_test_Slack.yml new file mode 100644 index 0000000000..6c502d3b8d --- /dev/null +++ b/.github/workflows/oint_test_Slack.yml @@ -0,0 +1,165 @@ + +name: OINT | Тестирование Slack + +# Controls when the workflow will run +on: + workflow_dispatch: + +jobs: + + Decode: + runs-on: ubuntu-latest + if: ${{ always() }} + steps: + + - uses: actions/checkout@v4 + + - name: Расшифровать тестовые данные + run: gpg --quiet --batch --yes --decrypt --passphrase="$ENC_JSON" --output ./data.json ./data.json.gpg + env: + ENC_JSON: ${{ secrets.ENC_JSON }} + - name: Записать тестовые данные в кэш + uses: actions/cache/save@v3 + with: + key: test-data + path: ./data.json + + Build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + - name: Записать артефакт + uses: actions/upload-artifact@v4 + with: + name: oint + path: ./OInt/*.ospx + + + Testing-Slack: + runs-on: ubuntu-latest + needs: [Decode, Build] + steps: + + - uses: actions/checkout@v2 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Получить тестовые данные из кэша + uses: actions/cache/restore@v3 + with: + key: test-data + path: ./data.json + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + + + - name: Получить информацию о боте + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Слак_ПолучитьИнформациюОБоте" + + - name: Получить список пользователей + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Слак_ПолучитьСписокПользователей" + + - name: Получить список областей + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Слак_ПолучитьСписокОбластей" + + - name: Отправить/Удалить сообщение + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Слак_ОтправитьУдалитьСообщение" + + - name: Отправить/Удалить эфемерное + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Слак_ОтправитьУдалитьЭфемерное" + + - name: Получить отложенные сообщения + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Слак_ПолучитьОтложенныеСообщения" + + - name: Создать/Архивировать канал + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Слак_СоздатьАрхивироватьКанал" + + - name: Получить список каналов + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Слак_ПолучитьСписокКаналов" + + - name: Открыть/Закрыть диалог + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Слак_ОткрытьЗакрытьДиалог" + + - name: Получить список файлов + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Слак_ПолучитьСписокФайлов" + + - name: Загрузить/Удалить файл + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Слак_ЗагрузитьУдалитьФайл" + + - name: Получить список внеш. файлов + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Слак_ПолучитьСписокВФ" + + - name: Загрузить/Удалить внеш. файл + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Слак_ЗагрузитьУдалитьВФ" + + + Clear-Cache: + runs-on: ubuntu-latest + needs: [Testing-Telegram, Testing-VK, Testing-Viber, Testing-Twitter, Testing-YandexDisk, Testing-GoogleWorkspace, Testing-GoogleCalendar, Testing-GoogleDrive, Testing-GoogleSheets, Testing-Notion, Testing-Slack, Testing-Airtable, Testing-Telegram, Testing-VK, Testing-Viber, Testing-Twitter, Testing-YandexDisk, Testing-GoogleWorkspace, Testing-GoogleCalendar, Testing-GoogleDrive, Testing-GoogleSheets, Testing-Notion, Testing-Slack, Encode] + if: ${{ always() }} + steps: + - name: Очистка основного кэша + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data" + + - name: Очистка кэша Google + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data_google" + + - name: Очистка кэша Twitter + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data_new" diff --git a/.github/workflows/oint_test_Telegram.yml b/.github/workflows/oint_test_Telegram.yml new file mode 100644 index 0000000000..77f75ff5c0 --- /dev/null +++ b/.github/workflows/oint_test_Telegram.yml @@ -0,0 +1,209 @@ + +name: OINT | Тестирование Telegram + +# Controls when the workflow will run +on: + workflow_dispatch: + +jobs: + + Decode: + runs-on: ubuntu-latest + if: ${{ always() }} + steps: + + - uses: actions/checkout@v4 + + - name: Расшифровать тестовые данные + run: gpg --quiet --batch --yes --decrypt --passphrase="$ENC_JSON" --output ./data.json ./data.json.gpg + env: + ENC_JSON: ${{ secrets.ENC_JSON }} + - name: Записать тестовые данные в кэш + uses: actions/cache/save@v3 + with: + key: test-data + path: ./data.json + + Build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + - name: Записать артефакт + uses: actions/upload-artifact@v4 + with: + name: oint + path: ./OInt/*.ospx + + + Testing-Telegram: + runs-on: ubuntu-latest + needs: [Decode, Build] + steps: + + - uses: actions/checkout@v2 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Получить тестовые данные из кэша + uses: actions/cache/restore@v3 + with: + key: test-data + path: ./data.json + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + + + - name: Получить информацию бота + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ПолучитьИнформациюБота" + + - name: Получить обновления + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ПолучитьОбновления" + + - name: Установить Webhook + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_УстановитьWebhook" + + - name: Удалить Webhook + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_УдалитьWebhook" + + - name: Отправить текстовое сообщение + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьТекстовоеСообщение" + + - name: Отправить картинку + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьКартинку" + + - name: Отправить видео + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьВидео" + + - name: Отправить аудио + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьАудио" + + - name: Отправить документ + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьДокумент" + + - name: Отправить гифку + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьГифку" + + - name: Отправить медиагруппу + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьМедиагруппу" + + - name: Отправить местоположение + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьМестоположение" + + - name: Отправить контакт + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьКонтакт" + + - name: Отправить опрос + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьОпрос" + + - name: Переслать сообщение + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ПереслатьСообщение" + + - name: Бан/Разбан + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_БанРазбан" + + - name: Создать ссылку-приглашение + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_СоздатьСсылкуПриглашение" + + - name: Закрепить/Открепить сообщение + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ЗакрепитьОткрепитьСообщение" + + - name: Получить число участников + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ПолучитьЧислоУчастников" + + - name: Получить список аватаров форума + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ПолучитьСписокАватаровФорума" + + - name: Создать/Удалить тему форума + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_СоздатьУдалитьТемуФорума" + + - name: Открыть/Закрыть главную тему + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОткрытьЗакрытьГлавнуюТему" + + - name: Изменить имя главной темы + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ИзменитьИмяГлавнойТемы" + + - name: Скрыть/Показать главную тему + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_СкрытьПоказатьГлавнуюТему" + + + Clear-Cache: + runs-on: ubuntu-latest + needs: [Testing-Telegram, Testing-VK, Testing-Viber, Testing-Twitter, Testing-YandexDisk, Testing-GoogleWorkspace, Testing-GoogleCalendar, Testing-GoogleDrive, Testing-GoogleSheets, Testing-Notion, Testing-Slack, Testing-Airtable, Testing-Telegram, Encode] + if: ${{ always() }} + steps: + - name: Очистка основного кэша + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data" + + - name: Очистка кэша Google + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data_google" + + - name: Очистка кэша Twitter + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data_new" diff --git a/.github/workflows/oint_test_Twitter.yml b/.github/workflows/oint_test_Twitter.yml new file mode 100644 index 0000000000..9545f723c5 --- /dev/null +++ b/.github/workflows/oint_test_Twitter.yml @@ -0,0 +1,186 @@ + +name: OINT | Тестирование Twitter + +# Controls when the workflow will run +on: + workflow_dispatch: + +jobs: + + Decode: + runs-on: ubuntu-latest + if: ${{ always() }} + steps: + + - uses: actions/checkout@v4 + + - name: Расшифровать тестовые данные + run: gpg --quiet --batch --yes --decrypt --passphrase="$ENC_JSON" --output ./data.json ./data.json.gpg + env: + ENC_JSON: ${{ secrets.ENC_JSON }} + - name: Записать тестовые данные в кэш + uses: actions/cache/save@v3 + with: + key: test-data + path: ./data.json + + Build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + - name: Записать артефакт + uses: actions/upload-artifact@v4 + with: + name: oint + path: ./OInt/*.ospx + + + Testing-Twitter: + runs-on: ubuntu-latest + needs: [Decode, Build] + steps: + + - uses: actions/checkout@v2 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Получить тестовые данные из кэша + uses: actions/cache/restore@v3 + with: + key: test-data + path: ./data.json + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + + + - name: Получить ссылку авторизации + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Твиттер_ПолучитьСсылкуАвторизации" + + - name: Обновить токен + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Твиттер_ОбновитьТокен" + + - name: Текстовый твит + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Твиттер_СоздатьТекстовыйТвит" + + - name: Твит с картинкой + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Твиттер_СоздатьТвитСКартинкой" + + - name: Твит с видео + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Твиттер_СоздатьТвитСВидео" + + - name: Твит с гиф + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Твиттер_СоздатьТвитСГиф" + + - name: Твит с опросом + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Твиттер_СоздатьТвитСОпросом" + + - name: Записать измененные данные + if: ${{ cancelled() }} == false + uses: actions/cache/save@v3 + with: + key: test-data_new + path: ./data.json + + Encode: + runs-on: ubuntu-latest + needs: [Twitter] + if: ${{ always() }} + permissions: + contents: write + + steps: + + - uses: actions/checkout@v2 + + - name: Обновить данные в репозитории + run: git pull https://github.com/Bayselonarrend/OpenIntegrations + + - name: Получить тестовые данные из кэша + uses: actions/cache/restore@v3 + with: + key: test-data_new + path: ./data.json + + - name: Зашифровать данные обратно + continue-on-error: false + + run: | + rm -f ./data.json.gpg + gpg --batch --symmetric --cipher-algo AES256 --passphrase="$ENC_JSON" data.json + rm -f ./data.json + env: + ENC_JSON: ${{ secrets.ENC_JSON }} + + - name: Записать данные + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_user_name: Vitaly the Alpaca (bot) + commit_user_email: vitaly.the.alpaca@gmail.com + commit_author: Vitaly the Alpaca + commit_message: Обновление зашифрованных данных по результатам тестов (workflow) + + + Clear-Cache: + runs-on: ubuntu-latest + needs: [Testing-Telegram, Testing-VK, Testing-Viber, Testing-Twitter, Testing-YandexDisk, Testing-GoogleWorkspace, Testing-GoogleCalendar, Testing-GoogleDrive, Testing-GoogleSheets, Testing-Notion, Testing-Slack, Testing-Airtable, Testing-Telegram, Testing-VK, Testing-Viber, Testing-Twitter, Encode] + if: ${{ always() }} + steps: + - name: Очистка основного кэша + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data" + + - name: Очистка кэша Google + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data_google" + + - name: Очистка кэша Twitter + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data_new" diff --git a/.github/workflows/oint_test_VK.yml b/.github/workflows/oint_test_VK.yml new file mode 100644 index 0000000000..c6c2c79939 --- /dev/null +++ b/.github/workflows/oint_test_VK.yml @@ -0,0 +1,185 @@ + +name: OINT | Тестирование VK + +# Controls when the workflow will run +on: + workflow_dispatch: + +jobs: + + Decode: + runs-on: ubuntu-latest + if: ${{ always() }} + steps: + + - uses: actions/checkout@v4 + + - name: Расшифровать тестовые данные + run: gpg --quiet --batch --yes --decrypt --passphrase="$ENC_JSON" --output ./data.json ./data.json.gpg + env: + ENC_JSON: ${{ secrets.ENC_JSON }} + - name: Записать тестовые данные в кэш + uses: actions/cache/save@v3 + with: + key: test-data + path: ./data.json + + Build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + - name: Записать артефакт + uses: actions/upload-artifact@v4 + with: + name: oint + path: ./OInt/*.ospx + + + Testing-VK: + runs-on: ubuntu-latest + needs: [Decode, Build] + steps: + + - uses: actions/checkout@v2 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Получить тестовые данные из кэша + uses: actions/cache/restore@v3 + with: + key: test-data + path: ./data.json + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + + + - name: Создать ссылку получения токена + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_СоздатьСсылкуТокена" + + - name: Создать/Удалить пост + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_СоздатьУдалитьПост" + + - name: Создать опрос + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_СоздатьОпрос" + + - name: Добавить/Удалить картинку + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_СохранитьУдалитьКартинку" + + - name: Создать историю + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_СоздатьИсторию" + + - name: Действия с обсуждениями + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_МетодыОбсуждений" + + - name: Лайк/Репост/Комментарий + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_ЛайкРепостКоммент" + + - name: Получить статистику + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_ПолучитьСтатистику" + + - name: Получить статистику постов + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_ПолучитьСтатистикуПостов" + + - name: Создать рекламную кампанию + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_СоздатьРекламнуюКампанию" + + - name: Отправить сообщение + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_ОтправитьСообщение" + + - name: Получить категории товаров + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_ПолучитьКатегорииТоваров" + + - name: Создать товар и подборку + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_СоздатьТоварПодборку" + + - name: Создать товар со свойствами + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_СоздатьТоварСоСвойствами" + + - name: Получить список товаров + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_ПолучитьСписокТоваров" + + - name: Получить список подборок + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_ПолучитьСписокПодборок" + + - name: Получить список свойств + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_ПолучитьСписокСвойств" + + - name: Получить список заказов + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_ПолучитьСписокЗаказов" + + + Clear-Cache: + runs-on: ubuntu-latest + needs: [Testing-Telegram, Testing-VK, Testing-Viber, Testing-Twitter, Testing-YandexDisk, Testing-GoogleWorkspace, Testing-GoogleCalendar, Testing-GoogleDrive, Testing-GoogleSheets, Testing-Notion, Testing-Slack, Testing-Airtable, Testing-Telegram, Testing-VK, Encode] + if: ${{ always() }} + steps: + - name: Очистка основного кэша + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data" + + - name: Очистка кэша Google + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data_google" + + - name: Очистка кэша Twitter + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data_new" diff --git a/.github/workflows/oint_test_Viber.yml b/.github/workflows/oint_test_Viber.yml new file mode 100644 index 0000000000..fc70f39dfa --- /dev/null +++ b/.github/workflows/oint_test_Viber.yml @@ -0,0 +1,149 @@ + +name: OINT | Тестирование Viber + +# Controls when the workflow will run +on: + workflow_dispatch: + +jobs: + + Decode: + runs-on: ubuntu-latest + if: ${{ always() }} + steps: + + - uses: actions/checkout@v4 + + - name: Расшифровать тестовые данные + run: gpg --quiet --batch --yes --decrypt --passphrase="$ENC_JSON" --output ./data.json ./data.json.gpg + env: + ENC_JSON: ${{ secrets.ENC_JSON }} + - name: Записать тестовые данные в кэш + uses: actions/cache/save@v3 + with: + key: test-data + path: ./data.json + + Build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + - name: Записать артефакт + uses: actions/upload-artifact@v4 + with: + name: oint + path: ./OInt/*.ospx + + + Testing-Viber: + runs-on: ubuntu-latest + needs: [Decode, Build] + steps: + + - uses: actions/checkout@v2 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Получить тестовые данные из кэша + uses: actions/cache/restore@v3 + with: + key: test-data + path: ./data.json + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + + + - name: Получить информацию канала + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Вайбер_ПолучитьИнформациюОКанале" + + - name: Получить данные пользователя + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Вайбер_ПолучитьДанныеПользователя" + + - name: Получить онлайн пользователей + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Вайбер_ПолучитьОнлайнПользователей" + + - name: Отправить текстовое сообщение + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Вайбер_ОтправитьТекстовоеСообщение" + + - name: Отправить картинку + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Вайбер_ОтправитьКартинку" + + - name: Отправить файл + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Вайбер_ОтправитьФайл" + + - name: Отправить контакт + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Вайбер_ОтправитьКонтакт" + + - name: Отправить локацию + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Вайбер_ОтправитьЛокацию" + + - name: Отправить ссылку + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Вайбер_ОтправитьСсылку" + + + Clear-Cache: + runs-on: ubuntu-latest + needs: [Testing-Telegram, Testing-VK, Testing-Viber, Testing-Twitter, Testing-YandexDisk, Testing-GoogleWorkspace, Testing-GoogleCalendar, Testing-GoogleDrive, Testing-GoogleSheets, Testing-Notion, Testing-Slack, Testing-Airtable, Testing-Telegram, Testing-VK, Testing-Viber, Encode] + if: ${{ always() }} + steps: + - name: Очистка основного кэша + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data" + + - name: Очистка кэша Google + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data_google" + + - name: Очистка кэша Twitter + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data_new" diff --git a/.github/workflows/oint_test_YandexDisk.yml b/.github/workflows/oint_test_YandexDisk.yml new file mode 100644 index 0000000000..991e473a20 --- /dev/null +++ b/.github/workflows/oint_test_YandexDisk.yml @@ -0,0 +1,153 @@ + +name: OINT | Тестирование YandexDisk + +# Controls when the workflow will run +on: + workflow_dispatch: + +jobs: + + Decode: + runs-on: ubuntu-latest + if: ${{ always() }} + steps: + + - uses: actions/checkout@v4 + + - name: Расшифровать тестовые данные + run: gpg --quiet --batch --yes --decrypt --passphrase="$ENC_JSON" --output ./data.json ./data.json.gpg + env: + ENC_JSON: ${{ secrets.ENC_JSON }} + - name: Записать тестовые данные в кэш + uses: actions/cache/save@v3 + with: + key: test-data + path: ./data.json + + Build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + - name: Записать артефакт + uses: actions/upload-artifact@v4 + with: + name: oint + path: ./OInt/*.ospx + + + Testing-YandexDisk: + runs-on: ubuntu-latest + needs: [Decode, Build] + steps: + + - uses: actions/checkout@v2 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Получить тестовые данные из кэша + uses: actions/cache/restore@v3 + with: + key: test-data + path: ./data.json + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + + + - name: Получить информацию о диске + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ЯДиск_ПолучитьИнформациюОДиске" + + - name: Создать папку + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ЯДиск_СоздатьПапку" + + - name: Загрузить по URL и получить + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ЯДиск_ЗагрузитьПоАдресуПолучитьОбъект" + + - name: Загрузить/Удалить файл + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ЯДиск_ЗагрузитьУдалитьФайл" + + - name: Создать копию объекта + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ЯДиск_СоздатьКопиюОбъекта" + + - name: Получить ссылку на скачивание + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ЯДиск_ПолучитьСсылкуНаСкачивание" + + - name: Получить список файлов + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ЯДиск_ПолучитьСписокФайлов" + + - name: Переместить объект + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ЯДиск_ПереместитьОбъект" + + - name: Действия с публичными объектами + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ЯДиск_ДействияПубличныхОбъектов" + + - name: Получить список опубликованных + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ЯДиск_ПолучитьСписокОпубликованных" + + + Clear-Cache: + runs-on: ubuntu-latest + needs: [Testing-Telegram, Testing-VK, Testing-Viber, Testing-Twitter, Testing-YandexDisk, Testing-GoogleWorkspace, Testing-GoogleCalendar, Testing-GoogleDrive, Testing-GoogleSheets, Testing-Notion, Testing-Slack, Testing-Airtable, Testing-Telegram, Testing-VK, Testing-Viber, Testing-Twitter, Testing-YandexDisk, Encode] + if: ${{ always() }} + steps: + - name: Очистка основного кэша + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data" + + - name: Очистка кэша Google + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data_google" + + - name: Очистка кэша Twitter + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data_new" diff --git a/.github/workflows/oint_test_full.yml b/.github/workflows/oint_test_full.yml new file mode 100644 index 0000000000..1c09eae739 --- /dev/null +++ b/.github/workflows/oint_test_full.yml @@ -0,0 +1,923 @@ + +name: OINT | Полное тестирование + +# Controls when the workflow will run +on: + workflow_dispatch: + +jobs: + + Decode: + runs-on: ubuntu-latest + if: ${{ always() }} + steps: + + - uses: actions/checkout@v4 + + - name: Расшифровать тестовые данные + run: gpg --quiet --batch --yes --decrypt --passphrase="$ENC_JSON" --output ./data.json ./data.json.gpg + env: + ENC_JSON: ${{ secrets.ENC_JSON }} + - name: Записать тестовые данные в кэш + uses: actions/cache/save@v3 + with: + key: test-data + path: ./data.json + + Build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + - name: Записать артефакт + uses: actions/upload-artifact@v4 + with: + name: oint + path: ./OInt/*.ospx + + + Testing-Telegram: + runs-on: ubuntu-latest + needs: [Decode, Build] + steps: + + - uses: actions/checkout@v2 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Получить тестовые данные из кэша + uses: actions/cache/restore@v3 + with: + key: test-data + path: ./data.json + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + + + - name: Получить информацию бота + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ПолучитьИнформациюБота" + + - name: Получить обновления + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ПолучитьОбновления" + + - name: Установить Webhook + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_УстановитьWebhook" + + - name: Удалить Webhook + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_УдалитьWebhook" + + - name: Отправить текстовое сообщение + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьТекстовоеСообщение" + + - name: Отправить картинку + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьКартинку" + + - name: Отправить видео + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьВидео" + + - name: Отправить аудио + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьАудио" + + - name: Отправить документ + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьДокумент" + + - name: Отправить гифку + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьГифку" + + - name: Отправить медиагруппу + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьМедиагруппу" + + - name: Отправить местоположение + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьМестоположение" + + - name: Отправить контакт + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьКонтакт" + + - name: Отправить опрос + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьОпрос" + + - name: Переслать сообщение + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ПереслатьСообщение" + + - name: Бан/Разбан + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_БанРазбан" + + - name: Создать ссылку-приглашение + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_СоздатьСсылкуПриглашение" + + - name: Закрепить/Открепить сообщение + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ЗакрепитьОткрепитьСообщение" + + - name: Получить число участников + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ПолучитьЧислоУчастников" + + - name: Получить список аватаров форума + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ПолучитьСписокАватаровФорума" + + - name: Создать/Удалить тему форума + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_СоздатьУдалитьТемуФорума" + + - name: Открыть/Закрыть главную тему + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОткрытьЗакрытьГлавнуюТему" + + - name: Изменить имя главной темы + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ИзменитьИмяГлавнойТемы" + + - name: Скрыть/Показать главную тему + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_СкрытьПоказатьГлавнуюТему" + + + Testing-VK: + runs-on: ubuntu-latest + needs: [Decode, Build] + steps: + + - uses: actions/checkout@v2 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Получить тестовые данные из кэша + uses: actions/cache/restore@v3 + with: + key: test-data + path: ./data.json + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + + + - name: Создать ссылку получения токена + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_СоздатьСсылкуТокена" + + - name: Создать/Удалить пост + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_СоздатьУдалитьПост" + + - name: Создать опрос + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_СоздатьОпрос" + + - name: Добавить/Удалить картинку + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_СохранитьУдалитьКартинку" + + - name: Создать историю + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_СоздатьИсторию" + + - name: Действия с обсуждениями + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_МетодыОбсуждений" + + - name: Лайк/Репост/Комментарий + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_ЛайкРепостКоммент" + + - name: Получить статистику + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_ПолучитьСтатистику" + + - name: Получить статистику постов + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_ПолучитьСтатистикуПостов" + + - name: Создать рекламную кампанию + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_СоздатьРекламнуюКампанию" + + - name: Отправить сообщение + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_ОтправитьСообщение" + + - name: Получить категории товаров + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_ПолучитьКатегорииТоваров" + + - name: Создать товар и подборку + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_СоздатьТоварПодборку" + + - name: Создать товар со свойствами + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_СоздатьТоварСоСвойствами" + + - name: Получить список товаров + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_ПолучитьСписокТоваров" + + - name: Получить список подборок + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_ПолучитьСписокПодборок" + + - name: Получить список свойств + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_ПолучитьСписокСвойств" + + - name: Получить список заказов + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ВК_ПолучитьСписокЗаказов" + + + Testing-Viber: + runs-on: ubuntu-latest + needs: [Decode, Build] + steps: + + - uses: actions/checkout@v2 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Получить тестовые данные из кэша + uses: actions/cache/restore@v3 + with: + key: test-data + path: ./data.json + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + + + - name: Получить информацию канала + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Вайбер_ПолучитьИнформациюОКанале" + + - name: Получить данные пользователя + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Вайбер_ПолучитьДанныеПользователя" + + - name: Получить онлайн пользователей + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Вайбер_ПолучитьОнлайнПользователей" + + - name: Отправить текстовое сообщение + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Вайбер_ОтправитьТекстовоеСообщение" + + - name: Отправить картинку + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Вайбер_ОтправитьКартинку" + + - name: Отправить файл + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Вайбер_ОтправитьФайл" + + - name: Отправить контакт + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Вайбер_ОтправитьКонтакт" + + - name: Отправить локацию + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Вайбер_ОтправитьЛокацию" + + - name: Отправить ссылку + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Вайбер_ОтправитьСсылку" + + + Testing-Twitter: + runs-on: ubuntu-latest + needs: [Decode, Build] + steps: + + - uses: actions/checkout@v2 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Получить тестовые данные из кэша + uses: actions/cache/restore@v3 + with: + key: test-data + path: ./data.json + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + + + - name: Получить ссылку авторизации + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Твиттер_ПолучитьСсылкуАвторизации" + + - name: Обновить токен + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Твиттер_ОбновитьТокен" + + - name: Текстовый твит + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Твиттер_СоздатьТекстовыйТвит" + + - name: Твит с картинкой + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Твиттер_СоздатьТвитСКартинкой" + + - name: Твит с видео + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Твиттер_СоздатьТвитСВидео" + + - name: Твит с гиф + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Твиттер_СоздатьТвитСГиф" + + - name: Твит с опросом + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Твиттер_СоздатьТвитСОпросом" + + - name: Записать измененные данные + if: ${{ cancelled() }} == false + uses: actions/cache/save@v3 + with: + key: test-data_new + path: ./data.json + + + Testing-YandexDisk: + runs-on: ubuntu-latest + needs: [Decode, Build] + steps: + + - uses: actions/checkout@v2 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Получить тестовые данные из кэша + uses: actions/cache/restore@v3 + with: + key: test-data + path: ./data.json + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + + + - name: Получить информацию о диске + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ЯДиск_ПолучитьИнформациюОДиске" + + - name: Создать папку + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ЯДиск_СоздатьПапку" + + - name: Загрузить по URL и получить + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ЯДиск_ЗагрузитьПоАдресуПолучитьОбъект" + + - name: Загрузить/Удалить файл + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ЯДиск_ЗагрузитьУдалитьФайл" + + - name: Создать копию объекта + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ЯДиск_СоздатьКопиюОбъекта" + + - name: Получить ссылку на скачивание + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ЯДиск_ПолучитьСсылкуНаСкачивание" + + - name: Получить список файлов + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ЯДиск_ПолучитьСписокФайлов" + + - name: Переместить объект + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ЯДиск_ПереместитьОбъект" + + - name: Действия с публичными объектами + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ЯДиск_ДействияПубличныхОбъектов" + + - name: Получить список опубликованных + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ЯДиск_ПолучитьСписокОпубликованных" + + + Testing-GoogleWorkspace: + runs-on: ubuntu-latest + needs: [Decode, Build] + steps: + + - uses: actions/checkout@v2 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Получить тестовые данные из кэша + uses: actions/cache/restore@v3 + with: + key: test-data + path: ./data.json + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + + + - name: Получить ссылку авторизации + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ГВ_ПолучитьСсылкуАвторизации" + + - name: Получить токен + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ГВ_ПолучитьТокен" + + - name: Обновить токен + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ГВ_ОбновитьТокен" + + - name: Записать измененные данные + if: ${{ cancelled() }} == false + uses: actions/cache/save@v3 + with: + key: test-data_google + path: ./data.json + + + Testing-GoogleCalendar: + runs-on: ubuntu-latest + needs: Testing-GoogleWorkspace + steps: + + - uses: actions/checkout@v2 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Получить тестовые данные из кэша + uses: actions/cache/restore@v3 + with: + key: test-data_google + path: ./data.json + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + + + - name: Получить список календарей + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ГК_ПолучитьСписокКалендарей" + + - name: Создать/Удалить календарь + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ГК_СоздатьУдалитьКалендарь" + + - name: Создать/Удалить событие + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ГК_СоздатьУдалитьСобытие" + + - name: Получить список событий + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ГК_ПолучитьСписокСобытий" + + + Testing-GoogleDrive: + runs-on: ubuntu-latest + needs: Testing-GoogleWorkspace + steps: + + - uses: actions/checkout@v2 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Получить тестовые данные из кэша + uses: actions/cache/restore@v3 + with: + key: test-data_google + path: ./data.json + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + + + - name: Получить список каталогов + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ГД_ПолучитьСписокКаталогов" + + - name: Загрузить/Удалить Файл + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ГД_ЗагрузитьУдалитьФайл" + + - name: Создать/Удалить кооментарий + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ГД_СоздатьУдалитьКомментарий" + + - name: Создать/Удалить каталог + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ГД_СоздатьКаталог" + + + Testing-GoogleSheets: + runs-on: ubuntu-latest + needs: Testing-GoogleWorkspace + steps: + + - uses: actions/checkout@v2 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Получить тестовые данные из кэша + uses: actions/cache/restore@v3 + with: + key: test-data_google + path: ./data.json + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + + + - name: Создать таблицу + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ГТ_СоздатьТаблицу" + + - name: Получить таблицу + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ГТ_ПолучитьТаблицу" + + - name: Заполнить/Очистить ячейки + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "ГТ_ЗаполнитьОчиститьЯчейки" + + + Testing-Notion: + runs-on: ubuntu-latest + needs: [Decode, Build] + steps: + + - uses: actions/checkout@v2 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Получить тестовые данные из кэша + uses: actions/cache/restore@v3 + with: + key: test-data + path: ./data.json + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + + + - name: Создать страницу + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Ноушн_СоздатьСтраницу" + + - name: Создать/Изменить базу + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Ноушн_СоздатьИзменитьБазу" + + - name: Получить информацию о странице + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Ноушн_ПолучитьИнформациюОСтранице" + + - name: Получить информацию о базе + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Ноушн_ПолучитьИнформациюОБазе" + + - name: Создать страницу в базу + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Ноушн_СоздатьСтраницуВБазу" + + - name: Изменить свойства страницы + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Ноушн_ИзменитьСвойстваСтраницы" + + - name: Создать/Удалить блок + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Ноушн_СоздатьУдалитьБлок" + + - name: Получить пользователей + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Ноушн_ПолучитьПользователей" + + - name: Получить данные пользователя + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Ноушн_ПолучитьДанныеПользователя" + + + Testing-Slack: + runs-on: ubuntu-latest + needs: [Decode, Build] + steps: + + - uses: actions/checkout@v2 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Получить тестовые данные из кэша + uses: actions/cache/restore@v3 + with: + key: test-data + path: ./data.json + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + + + - name: Получить информацию о боте + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Слак_ПолучитьИнформациюОБоте" + + - name: Получить список пользователей + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Слак_ПолучитьСписокПользователей" + + - name: Получить список областей + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Слак_ПолучитьСписокОбластей" + + - name: Отправить/Удалить сообщение + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Слак_ОтправитьУдалитьСообщение" + + - name: Отправить/Удалить эфемерное + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Слак_ОтправитьУдалитьЭфемерное" + + - name: Получить отложенные сообщения + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Слак_ПолучитьОтложенныеСообщения" + + - name: Создать/Архивировать канал + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Слак_СоздатьАрхивироватьКанал" + + - name: Получить список каналов + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Слак_ПолучитьСписокКаналов" + + - name: Открыть/Закрыть диалог + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Слак_ОткрытьЗакрытьДиалог" + + - name: Получить список файлов + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Слак_ПолучитьСписокФайлов" + + - name: Загрузить/Удалить файл + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Слак_ЗагрузитьУдалитьФайл" + + - name: Получить список внеш. файлов + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Слак_ПолучитьСписокВФ" + + - name: Загрузить/Удалить внеш. файл + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Слак_ЗагрузитьУдалитьВФ" + + + Testing-Airtable: + runs-on: ubuntu-latest + needs: [Decode, Build] + steps: + + - uses: actions/checkout@v2 + - uses: otymko/setup-onescript@v1.4 + with: + version: 1.9.0 + + - name: Получить тестовые данные из кэша + uses: actions/cache/restore@v3 + with: + key: test-data + path: ./data.json + + - name: Установить asserts и 1testrunner + run: | + opm install asserts + opm install 1testrunner + + - name: Установить OInt + run: | + cd ./OInt + opm build + opm install *.ospx + + + + - name: Создать/Изменить базу + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "АТ_СоздатьБазу" + + - name: Создать/Изменить таблицу + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "АТ_СоздатьТаблицу" + + - name: Создать/Изменить поле + if: ${{ cancelled() }} == false + run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "АТ_СоздатьПоле" + + Encode: + runs-on: ubuntu-latest + needs: [Twitter] + if: ${{ always() }} + permissions: + contents: write + + steps: + + - uses: actions/checkout@v2 + + - name: Обновить данные в репозитории + run: git pull https://github.com/Bayselonarrend/OpenIntegrations + + - name: Получить тестовые данные из кэша + uses: actions/cache/restore@v3 + with: + key: test-data_new + path: ./data.json + + - name: Зашифровать данные обратно + continue-on-error: false + + run: | + rm -f ./data.json.gpg + gpg --batch --symmetric --cipher-algo AES256 --passphrase="$ENC_JSON" data.json + rm -f ./data.json + env: + ENC_JSON: ${{ secrets.ENC_JSON }} + + - name: Записать данные + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_user_name: Vitaly the Alpaca (bot) + commit_user_email: vitaly.the.alpaca@gmail.com + commit_author: Vitaly the Alpaca + commit_message: Обновление зашифрованных данных по результатам тестов (workflow) + + + Clear-Cache: + runs-on: ubuntu-latest + needs: [Testing-Telegram, Testing-VK, Testing-Viber, Testing-Twitter, Testing-YandexDisk, Testing-GoogleWorkspace, Testing-GoogleCalendar, Testing-GoogleDrive, Testing-GoogleSheets, Testing-Notion, Testing-Slack, Testing-Airtable, Encode] + if: ${{ always() }} + steps: + - name: Очистка основного кэша + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data" + + - name: Очистка кэша Google + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data_google" + + - name: Очистка кэша Twitter + run: | + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=test-data_new"