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
|
|
|
|
|
|
|
|
- name: Собрать бинарник
|
|
|
|
run: |
|
|
|
|
cd ./cli
|
|
|
|
oscript -make app.os bin
|
|
|
|
|
|
|
|
- name: Записать артефакт
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: oint
|
|
|
|
path: oint
|
|
|
|
|
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
|
|
|
|
run: oint telegram ПолучитьИнформациюБота --token ${{ env.json_Telegram_Token }}
|