feat(tools): upd CI (46) #718
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ master, CI ] | |
pull_request: | |
branches: [ master, CI ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
container: | |
image: docker.io/library/ubuntu:20.04 # Публичный образ Ubuntu 20.04 из Docker Hub | |
steps: | |
- name: Install Git | |
run: | | |
apt-get update | |
apt-get install -y git | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Install | |
run: | | |
ls | |
apt-get clean | |
apt-get update | |
apt-get upgrade -y | |
apt-get install -y sudo | |
apt-get install -y dpkg firefox | |
npm install -g testcafe | |
./tools/install-tarantool.sh | |
./control-install.sh | |
echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
- name: Print versions | |
run: | | |
node --version | |
testcafe --version | |
rustc -V | |
- name: Build | |
run: | | |
export CARGO_TARGET_DIR=$HOME/target | |
./build.sh | |
- name: Set up core dump configuration | |
run: | | |
# Создаем директорию для core dumps | |
export COREDUMP_DIR=$GITHUB_WORKSPACE/corefiles | |
mkdir -p $COREDUMP_DIR | |
# Включаем создание core dumps | |
ulimit -c unlimited | |
# Устанавливаем шаблон для имени core dump | |
echo "kernel.core_pattern=${COREDUMP_DIR}/core.%e.%t.%p.%s" | sudo tee /etc/sysctl.d/60-core-pattern.conf | |
sudo sysctl --system | |
- name: Test | |
run: | | |
# Запускаем скрипт | |
./control-start.sh | |
sleep 200 | |
# Проверяем наличие core dump файлов | |
echo "Checking for core dumps..." | |
CORE_FILES=$(find $COREDUMP_DIR -name "core.veda-az-indexer*" 2>/dev/null) | |
if [ -n "$CORE_FILES" ]; then | |
echo "Core files found:" | |
echo "$CORE_FILES" | |
for FILE in $CORE_FILES; do | |
echo "Processing file: $FILE" | |
gdb ./bin/veda-az-indexer "$FILE" -ex "bt" | |
done | |
else | |
echo "No core files found." | |
fi | |
# Выводим логи | |
tail -n +1 ./data/tarantool/tarantool.log | |
tail -n +1 ./logs/*.log | |
cd ./source-web && npm test |