From 0435937f8ed31e114fa253bc7a38b861ec0bfbfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Mon, 23 Sep 2024 21:35:18 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Add=20GitHub=20Actions=20workflo?= =?UTF-8?q?w=20to=20lint=20backend=20apart=20from=20tests=20(#1358)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/lint-backend.yml | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/lint-backend.yml diff --git a/.github/workflows/lint-backend.yml b/.github/workflows/lint-backend.yml new file mode 100644 index 0000000..f07d7ca --- /dev/null +++ b/.github/workflows/lint-backend.yml @@ -0,0 +1,40 @@ +name: Lint Backend + +on: + push: + branches: + - master + pull_request: + types: + - opened + - synchronize + +jobs: + + lint-backend: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Install uv + uses: astral-sh/setup-uv@v2 + with: + version: "0.4.15" + - run: uv run bash scripts/lint.sh + working-directory: backend + + # https://github.com/marketplace/actions/alls-green#why + lint-backend-alls-green: # This job does nothing and is only used for the branch protection + if: always() + needs: + - lint-backend + runs-on: ubuntu-latest + steps: + - name: Decide whether the needed jobs succeeded or failed + uses: re-actors/alls-green@release/v1 + with: + jobs: ${{ toJSON(needs) }}