From 40572b5ae850f68ebe5e9dea6e5e360c7a01af54 Mon Sep 17 00:00:00 2001 From: GeoJulien Date: Tue, 9 Jan 2024 20:46:11 +0100 Subject: [PATCH 1/3] ci: fix Python version for lint --- .github/workflows/linter.yml | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index ad28555b..4be52681 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -1,39 +1,44 @@ -name: "🐍 Linter" +name: "✅ Linter" env: PROJECT_FOLDER: "qgis_resource_sharing" - PYTHON_VERSION: 3.7 + PYTHON_VERSION: 3.9 # because linter is a required check, it must be triggered on every push and not filtered on paths on: push: branches: [master] - # paths: - # - '**.py' + paths: + - "**.py" + - .github/workflows/linter.yml + pull_request: branches: [master] -# paths: -# - '**.py' + paths: + - "**.py" + - .github/workflows/linter.yml jobs: - flake8: + lint-py: + name: Python 🐍 + runs-on: ubuntu-latest steps: - - name: Checkout + - name: Get source code uses: actions/checkout@v4 - - name: Setup Python + - name: Set up Python uses: actions/setup-python@v5 with: - python-version: ${{ env.PYTHON_VERSION }} cache: "pip" cache-dependency-path: "requirements/development.txt" + python-version: ${{ env.PYTHON_VERSION }} - name: Install project requirements run: | - python -m pip install -U -r requirements/base.txt - python -m pip install -U -r requirements/development.txt + python -m pip install -U pip setuptools wheel + python -m pip install -U requirements/development.txt - name: Lint with flake8 run: | From 154ce9fd5e385300eed7c553fd59112409e38787 Mon Sep 17 00:00:00 2001 From: GeoJulien Date: Tue, 9 Jan 2024 20:46:35 +0100 Subject: [PATCH 2/3] release: add tooling label --- .github/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/release.yml b/.github/release.yml index 64604cfd..b220d5af 100644 --- a/.github/release.yml +++ b/.github/release.yml @@ -14,6 +14,7 @@ changelog: - title: Tooling 🔧 labels: - ci-cd + - tooling - title: Documentation 📖 labels: - documentation From 85bd842b7c395fb2a06344108623b5b46fc69684 Mon Sep 17 00:00:00 2001 From: GeoJulien Date: Tue, 9 Jan 2024 20:52:39 +0100 Subject: [PATCH 3/3] fix: missing -r to install from requirements file --- .github/workflows/linter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 4be52681..0e68b944 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -38,7 +38,7 @@ jobs: - name: Install project requirements run: | python -m pip install -U pip setuptools wheel - python -m pip install -U requirements/development.txt + python -m pip install -U -r requirements/development.txt - name: Lint with flake8 run: |