From 0ea6e3a9e27e8363de07e5ea973984de91131247 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Rever=C3=B3n=20Molina?= Date: Sun, 5 May 2024 23:39:34 +0200 Subject: [PATCH] tools: update CI --- .github/workflows/python-app.yml | 35 ++++++++++---------------------- 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index c53143f..7220d5f 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -5,34 +5,21 @@ name: Python application on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] jobs: build: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.8 - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - name: Install Poetry - uses: dschep/install-poetry-action@v1.3 - with: - # Use the preview version of Poetry - preview: false - - name: Install dependencies - run: | - poetry install - python3 -m pip install --upgrade pip - pip install flake8 - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Lint with ruff + uses: chartboost/ruff-action@v1 + with: + args: "check ./morfist" + + - name: Format with ruff + uses: chartboost/ruff-action@v1 + with: + args: "format ./morfist --check "