From a84a1740bcff6378ec3c8b91b2cf07133ffb4f84 Mon Sep 17 00:00:00 2001 From: Maximilian Date: Wed, 14 Feb 2024 17:00:18 +0100 Subject: [PATCH] Create code-quality.yml --- .github/workflows/code-quality.yml | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/code-quality.yml diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml new file mode 100644 index 00000000..b93ce763 --- /dev/null +++ b/.github/workflows/code-quality.yml @@ -0,0 +1,40 @@ +# This workflow will install Python dependencies, run code-quality checks + +name: code-quality + +on: + pull_request: + branches: + - "*" + push: + branches: + - main + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python 3.12 + uses: actions/setup-python@v4 + with: + python-version: "3.12" + cache: 'pip' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Install pre-commit + run: | + pip install pre-commit + pre-commit install + + - name: Run code-quality checks + run: pre-commit run --all-files