2024-11-14 14:31:29 +00:00
|
|
|
name: "Telegram Shop Bot CI [DEMO]"
|
2024-11-14 20:15:51 +00:00
|
|
|
|
2024-11-14 14:31:29 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: ["demo"]
|
|
|
|
pull_request:
|
|
|
|
branches: ["demo"]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint:
|
2024-11-14 20:15:51 +00:00
|
|
|
runs-on: ubuntu-latest # Запускаем на универсальной платформе
|
2024-11-14 14:31:29 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
2024-11-14 20:15:51 +00:00
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Set up Node.js 22
|
|
|
|
run: |
|
|
|
|
# Устанавливаем nvm (Node Version Manager)
|
|
|
|
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
|
|
|
|
export NVM_DIR="$HOME/.nvm"
|
|
|
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
|
|
|
nvm install 22
|
|
|
|
nvm use 22
|
|
|
|
node -v # Проверка установленной версии Node.js
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: npm install
|
|
|
|
|
|
|
|
- name: Run lint
|
|
|
|
run: npm run lint
|