telegram-shop/.gitea/workflows/dev.yaml

52 lines
1.5 KiB
YAML
Raw Normal View History

2024-11-14 14:31:29 +00:00
name: "Telegram Shop Bot CI [DEV]"
2024-11-14 14:31:29 +00:00
on:
push:
branches:
- dev
2024-11-14 14:31:29 +00:00
pull_request:
branches:
- dev
2024-11-14 14:31:29 +00:00
env:
GITEA_HOST: git.softuniq.eu
2024-11-14 14:31:29 +00:00
jobs:
lint:
runs-on: ubuntu-latest # Запуск на Ubuntu
2024-11-14 14:31:29 +00:00
steps:
- name: Check DNS Resolution
run: |
echo "Проверка DNS-резолвинга"
curl -I https://${{ env.GITEA_HOST }}
2024-11-14 14:31:29 +00:00
- name: Checkout code
run: |
echo "Клонируем репозиторий"
git clone https://${{ env.GITEA_HOST }}/Telegram-Market/telegram-shop.git /workspace/Telegram-Market/telegram-shop
cd /workspace/Telegram-Market/telegram-shop
git checkout 3b112d891e4c1f06c8f1a4141d290705712bb4d8
- name: Set up Node.js 22
run: |
echo "Устанавливаем Node.js 22"
curl -sL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
node -v # Проверка установленной версии Node.js
- name: Install dependencies
run: |
echo "Устанавливаем зависимости"
npm install
- name: Initialize ESLint configuration
run: |
echo "Инициализируем конфигурацию ESLint"
if [ ! -f .eslintrc.json ]; then
npm init @eslint/config
fi
- name: Run lint
run: |
echo "Запуск линтинга"
npm run lint