From c1faaf12c85fdbbd40880a88c32b4fa643c5a873 Mon Sep 17 00:00:00 2001 From: Steven Bal Date: Thu, 31 Oct 2024 10:30:00 +0100 Subject: [PATCH] :construction_worker: Move code quality checks to separate workflow and add codeQL --- .github/workflows/code_quality.yml | 29 +++++++++++++++++++++++++++++ .github/workflows/codeql.yml | 26 ++++++++------------------ 2 files changed, 37 insertions(+), 18 deletions(-) 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..eadb1fea --- /dev/null +++ b/.github/workflows/code_quality.yml @@ -0,0 +1,29 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +name: Code quality checks + +on: + push: + branches: + - master + paths: + - '**.py' + - '**.yml' + pull_request: + paths: + - '**.py' + - '**.yml' + workflow_dispatch: + +jobs: + open-api-workflow-code-quality: + uses: maykinmedia/open-api-workflows/.github/workflows/code-quality.yml@v1 + with: + python-version: '3.11' + node-version: '18' + + django-settings-module: 'openklant.conf.ci' + django-secret-key: dummy diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index eadb1fea..4d5a3484 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -3,27 +3,17 @@ # # You may wish to alter this file to override the set of languages analyzed, # or to provide custom queries or build logic. -name: Code quality checks +name: "CodeQL" on: push: - branches: - - master - paths: - - '**.py' - - '**.yml' + branches: [master] pull_request: - paths: - - '**.py' - - '**.yml' - workflow_dispatch: + # The branches below must be a subset of the branches above + branches: [master] + schedule: + - cron: '0 23 * * 6' jobs: - open-api-workflow-code-quality: - uses: maykinmedia/open-api-workflows/.github/workflows/code-quality.yml@v1 - with: - python-version: '3.11' - node-version: '18' - - django-settings-module: 'openklant.conf.ci' - django-secret-key: dummy + open-api-workflow-code-analysis: + uses: maykinmedia/open-api-workflows/.github/workflows/code-analysis.yml@v1