Fixing the lint error #9
Workflow file for this run
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: CI/CD Pipeline | |
on: | |
push: | |
branches: | |
- main # Cambia "main" por la rama que desees | |
pull_request: | |
paths: | |
- '**/*.py' | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy test | |
run: | | |
echo "This is a test which deploys in the master branch" | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install black flake8 | |
- name: Lint with black | |
run: | | |
echo "Running black..." | |
black --check . | |
- name: Lint with Flake8 by action | |
uses: py-actions/flake8@v2 | |
with: | |
ignore: "F401,E501" | |
- name: Lint with flake8 | |
run: | | |
echo "Running flake8..." | |
flake8 --ignore=E501,W503 . | |
- name: Report lint results | |
if: failure() | |
run: | | |
echo "Linting failed. Please fix the errors and try again." |