Update pylint.yml

This commit is contained in:
kromskii2 authored and GitHub committed 2024-11-12 16:55:01 +07:00
1 parent 34c23b9460
commit 4a69488ebf
1 file changed
+67 -16
+67 -16
View File
@@ -1,27 +1,78 @@
name: Pylint name: CI/CD Workflow
on: [push] on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: "0 2 * * 1-5"
workflow_dispatch:
jobs: jobs:
build: build:
name: Build and Test
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
python-version: ["3.8", "3.9", "3.10"] node_version: ['18.x', '20.x']
os: [ubuntu-latest, windows-latest, macos-latest]
steps: steps:
- uses: actions/checkout@v4 - name: Checkout code
- name: Set up Python ${{ matrix.python-version }} uses: actions/checkout@v4
uses: actions/setup-python@v3
- name: Setup Node.js
uses: actions/setup-node@v4
with: with:
python-version: ${{ matrix.python-version }} node-version: ${{ matrix.node_version }}
- name: Install dependencies - name: Install dependencies
run: npm install
- name: Run tests
run: npm test
deploy:
name: Deploy to Staging
runs-on: ubuntu-22.04
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Deploy
run: | run: |
python -m pip install --upgrade pip echo "Deploying to staging..."
pip install -r requirements.txt # Ваши команды для деплоя
pip install pylint
- name: Verify installed packages docker:
run: | name: Build and Push Docker Image
pip list runs-on: ubuntu-22.04
- name: Analysing the code with pylint needs: build
run: |
pylint $(git ls-files '*.py') steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
push: true
tags: your-dockerhub-username/your-repo:tag
- name: Docker logout
run: docker logout