1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2024-12-16 11:38:11 +02:00
OpenIntegrations/.github/workflows/cli_test.yml

79 lines
2.1 KiB
YAML
Raw Normal View History

2024-03-20 15:36:22 +02:00
name: Тестирование OINT CLI
on:
workflow_dispatch:
jobs:
Decode:
runs-on: ubuntu-latest
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 }}
2024-03-20 20:09:56 +02:00
2024-03-20 15:36:22 +02:00
- name: Записать артефакт
uses: actions/upload-artifact@v4
with:
name: test_data
path: data.json
2024-03-20 20:09:56 +02:00
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: otymko/setup-onescript@v1.4
with:
version: 1.9.0
2024-03-20 20:15:04 +02:00
- name: Установить cmdline и asserts
run: |
opm install cmdline
opm install asserts
- name: Собрать и установить OInt
run: |
cd ./OInt
opm build
opm install oint-1.5.0.ospx
2024-03-20 20:09:56 +02:00
- name: Собрать бинарник
run: |
cd ./cli
2024-03-20 20:18:28 +02:00
oscript -make app.os oint_bin
2024-03-20 20:09:56 +02:00
- name: Записать артефакт
uses: actions/upload-artifact@v4
with:
name: oint
2024-03-20 20:18:28 +02:00
path: oint_bin
2024-03-20 20:09:56 +02:00
2024-03-20 15:36:22 +02:00
Testing-Telegram:
runs-on: ubuntu-latest
2024-03-20 20:09:56 +02:00
needs: [Decode, Build]
2024-03-20 15:36:22 +02:00
steps:
- name: Скачать артефакт с тестовой информацией
uses: actions/download-artifact@v4
with:
name: test_data
2024-03-20 20:09:56 +02:00
- name: Скачать артефакт с исполняемым файлом
uses: actions/download-artifact@v4
with:
name: oint
2024-03-20 15:36:22 +02:00
- name: JSON to variables
uses: rgarcia-phi/json-to-variables@v1.1.0
with:
filename: 'data.json'
masked: true
2024-03-20 20:09:56 +02:00
- name: Выполнить Телеграм_ПолучитьИнформациюБота
if: ${{ cancelled() }} == false
2024-03-20 20:18:28 +02:00
run: oint_bin telegram ПолучитьИнформациюБота --token ${{ env.json_Telegram_Token }}