2024-11-14 14:31:29 +00:00
|
|
|
name: "Telegram Shop Bot CI [DEV]"
|
2024-11-14 21:22:41 +00:00
|
|
|
|
2024-11-14 14:31:29 +00:00
|
|
|
on:
|
|
|
|
push:
|
2024-11-14 21:22:41 +00:00
|
|
|
branches:
|
|
|
|
- dev
|
2024-11-14 14:31:29 +00:00
|
|
|
pull_request:
|
2024-11-14 21:22:41 +00:00
|
|
|
branches:
|
|
|
|
- dev
|
2024-11-14 14:31:29 +00:00
|
|
|
|
2024-11-14 23:43:02 +00:00
|
|
|
env:
|
|
|
|
GITEA_HOST: git.softuniq.eu
|
|
|
|
|
2024-11-14 14:31:29 +00:00
|
|
|
jobs:
|
2024-11-14 23:33:48 +00:00
|
|
|
lint:
|
2024-11-14 21:22:41 +00:00
|
|
|
runs-on: ubuntu-latest # Запуск на Ubuntu
|
2024-11-14 14:31:29 +00:00
|
|
|
steps:
|
2024-11-14 22:24:18 +00:00
|
|
|
- name: Check DNS Resolution
|
2024-11-14 23:43:02 +00:00
|
|
|
run: |
|
|
|
|
echo "Проверка DNS-резолвинга"
|
|
|
|
curl -I https://${{ env.GITEA_HOST }}
|
|
|
|
|
2024-11-14 14:31:29 +00:00
|
|
|
- name: Checkout code
|
2024-11-14 23:44:41 +00:00
|
|
|
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
|
2024-11-14 21:22:41 +00:00
|
|
|
|
|
|
|
- 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
|
2024-11-14 23:43:02 +00:00
|
|
|
node -v # Проверка установленной версии Node.js
|
2024-11-14 21:22:41 +00:00
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
echo "Устанавливаем зависимости"
|
2024-11-14 23:43:02 +00:00
|
|
|
npm install
|
2024-11-14 21:22:41 +00:00
|
|
|
|
|
|
|
- name: Run lint
|
|
|
|
run: |
|
|
|
|
echo "Запуск линтинга"
|
2024-11-14 23:43:02 +00:00
|
|
|
npm run lint
|