mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2024-12-16 11:38:11 +02:00
210 lines
10 KiB
YAML
210 lines
10 KiB
YAML
|
|
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"
|