Skip to content

Commit

Permalink
Added pipeline (#436)
Browse files Browse the repository at this point in the history
* Added pipeline

* Changed the path to the files
  • Loading branch information
Reversenant authored Nov 8, 2024
1 parent 1588f6f commit 1080888
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/ci-integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Integration tests

on:
push:
paths:
- 'common/**'
- 'packages/**'
pull_request:
branches:
- master
paths:
- 'common/**'
- 'packages/**'

jobs:
integration_tests:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Update package list and install dependencies
run: |
sudo apt-get update
sudo apt-get install -y wget tar
- name: Download xp-kbt archive
run: |
KBT_VERSION="27.0.78"
KBT_URL="https://github.com/vxcontrol/xp-kbt/releases/download/${KBT_VERSION}/kbt.${KBT_VERSION}-linux.tar.gz"
wget $KBT_URL -O /home/runner/xp-kbt.tar.gz
- name: Extract xp-kbt archive
run: |
mkdir -p /home/runner/xp-kbt
tar -xzvf /home/runner/xp-kbt.tar.gz -C /home/runner/xp-kbt
- name: Create required directories
run: |
mkdir -p /home/runner/temp/eXtractionAndProcessing/output/packages
- name: Run tests
run: |
/home/runner/xp-kbt/extra-tools/siemj/siemj -c .github/workflows/siemj.conf main
73 changes: 73 additions & 0 deletions .github/workflows/siemj.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
[DEFAULT]
# Базовый путь к SDK и инструментам
xp_kbt_base=/home/runner/xp-kbt
ptsiem_sdk=${xp_kbt_base}/xp-sdk
build_tools=${xp_kbt_base}/build-tools
taxonomy=${xp_kbt_base}/knowledgebase/contracts/taxonomy/taxonomy.json

# Общие пути для рабочего пространства
GITHUB_WORKSPACE=/home/runner/work/open-xp-rules/open-xp-rules
output_folder=/home/runner/temp/eXtractionAndProcessing/output/packages
temp=/home/runner/xp-kbt/temp/eXtractionAndProcessing/output

# Графы
[make-nfgraph]
type=BUILD_RULES
rcc_lang=n
rules_src=${GITHUB_WORKSPACE}/packages
xp_appendix=${xp_kbt_base}/knowledgebase/contracts/xp_appendix/appendix.xp
out=${output_folder}/formulas_graph.json

[make-argraph]
type=BUILD_RULES
rcc_lang=a
rules_src=${GITHUB_WORKSPACE}/packages
out=${output_folder}/aggfilters.json

[make-tables-schema]
type=BUILD_TABLES_SCHEMA
table_list_schema_src=${GITHUB_WORKSPACE}/packages
contract=${xp_kbt_base}/knowledgebase/contracts/tabular_lists/tables_contract.yaml
out=${output_folder}

[make-tables-db]
type=BUILD_TABLES_DATABASE
table_list_filltype=All
table_list_schema=${output_folder}/schema.json
table_list_defaults=${output_folder}/correlation_defaults.json
out=${output_folder}/fpta_db.db

[make-ergraph]
type=BUILD_RULES
rcc_lang=e
rules_src=${GITHUB_WORKSPACE}/packages
rfilters_src=${GITHUB_WORKSPACE}/common/rules_filters
table_list_schema=${output_folder}/schema.json
out=${output_folder}/enrules_graph.json

[make-crgraph]
type=BUILD_RULES
rcc_lang=c
rules_src=${GITHUB_WORKSPACE}/packages
rfilters_src=${GITHUB_WORKSPACE}/common/rules_filters
table_list_schema=${output_folder}/schema.json
out=${output_folder}/corrules_graph.json

# Тестирование правил
[rules-tests]
type=TEST_RULES
cr_timeout=250
keep_temp_files=no
without_sdk_logs=yes
formulas=${output_folder}/formulas_graph.json
enrules=${output_folder}/enrules_graph.json
corrules=${output_folder}/corrules_graph.json
aggrules=${output_folder}/aggfilters.json
table_list_defaults=${output_folder}/correlation_defaults.json
rules_src=${GITHUB_WORKSPACE}/packages
temp=/home/runner/xp-kbt/temp/eXtractionAndProcessing/output

# Основной сценарий
[main]
type=SCENARIO
scenario=make-nfgraph make-argraph make-tables-schema make-tables-db make-ergraph make-crgraph rules-tests

0 comments on commit 1080888

Please sign in to comment.