1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2024-12-12 11:15:07 +02:00
OpenIntegrations/.github/workflows/test.yml

122 lines
6.7 KiB
YAML
Raw Normal View History

2024-03-15 16:03:38 +02:00
# This is a basic workflow to help you get started with Actions
name: Основная обработка OInt (OneScript)
# Controls when the workflow will run
on:
workflow_dispatch:
jobs:
Convert:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- uses: otymko/setup-onescript@v1.4
with:
version: 1.9.0
- name: Выполнить скрипт преобразования OPI -> OInt
run: oscript ./.github/workflows/convert.os
Decode:
runs-on: ubuntu-latest
2024-03-15 16:06:55 +02:00
needs: Convert
2024-03-15 16:03:38 +02:00
steps:
- uses: actions/checkout@v2
- 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/upload-artifact@v4
with:
name: test_data
path: data.json
2024-03-15 16:29:50 +02:00
Testing-Telegram:
2024-03-15 16:03:38 +02:00
runs-on: ubuntu-latest
2024-03-15 16:06:55 +02:00
needs: Decode
2024-03-15 16:03:38 +02:00
steps:
- uses: actions/checkout@v2
- uses: otymko/setup-onescript@v1.4
with:
version: 1.9.0
- name: Скачать артефакт с тестовой информацией
uses: actions/download-artifact@v4
with:
name: test_data
- name: Установить asserts и 1testrunner
run: |
opm install asserts
opm install 1testrunner
- name: Выполнить тесты
continue-on-error: true
2024-03-15 16:29:50 +02:00
run: |
oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ПолучитьИнформациюБота"
oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ПолучитьОбновления"
oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_УстановитьWebhook"
oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_УдалитьWebhook"
oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьТекстовоеСообщение"
oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьКартинку"
oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьВидео"
oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьАудио"
oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьДокумент"
oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьГифку"
oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьМедиагруппу"
oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьМестоположение"
oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьКонтакт"
oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОтправитьОпрос"
oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ПереслатьСообщение"
oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_БанРазбан"
oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_СоздатьСсылкуПриглашение"
oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ЗакрепитьОткрепитьСообщение"
oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ПолучитьСписокАватаровФорума"
oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_СоздатьУдалитьТемуФорума"
oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ОткрытьЗакрытьГлавнуюТему"
oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./OInt/tests/Modules/internal/OPI_Тесты.os "Телеграм_ИзменитьИмяГлавнойТемы"
2024-03-15 16:03:38 +02:00
- name: Записать артефакт
uses: actions/upload-artifact@v4
with:
2024-03-15 16:29:50 +02:00
name: test_data_new
2024-03-15 16:03:38 +02:00
path: data.json
Encode:
runs-on: ubuntu-latest
2024-03-15 16:31:09 +02:00
needs: Testing-Telegram
2024-03-15 16:03:38 +02:00
steps:
- uses: actions/checkout@v2
- name: Скачать артефакт с тестовой информацией
uses: actions/download-artifact@v4
with:
2024-03-15 16:29:50 +02:00
name: test_data_new
2024-03-15 16:03:38 +02:00
- 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 }}
- uses: stefanzweifel/git-auto-commit-action@v5