From da0fb5438d184b544247c52d8a7584c15a4f3311 Mon Sep 17 00:00:00 2001 From: Tero Virtanen Date: Fri, 4 Oct 2024 12:51:36 +0300 Subject: [PATCH 1/7] chore: ci workflow OH-136 --- .github/workflows/ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..668daf7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,14 @@ +name: CI +on: + push: + branches: [main] + pull_request: +jobs: + common-ci: + # reusable workflow from .github -repository + # database-type: postgres / postgis + uses: City-of-Helsinki/.github/.github/workflows/ci-django-api.yml@reusable_workflow + secrets: inherit + with: + python-version: 3.9 + database-type: postgis # postgres / postgis \ No newline at end of file From 8e5a60e4ac18fb462e2a6a5731b38579403b2df7 Mon Sep 17 00:00:00 2001 From: Tero Virtanen Date: Fri, 4 Oct 2024 13:37:35 +0300 Subject: [PATCH 2/7] chore: remove useless comment --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 668daf7..0d03200 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,4 +11,4 @@ jobs: secrets: inherit with: python-version: 3.9 - database-type: postgis # postgres / postgis \ No newline at end of file + database-type: postgis \ No newline at end of file From e5e51a5549d9cb73ecc6467ebee427855322a95f Mon Sep 17 00:00:00 2001 From: Tero Virtanen Date: Fri, 4 Oct 2024 14:24:28 +0300 Subject: [PATCH 3/7] chore: sonar config --- sonar-project.properties | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sonar-project.properties diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..9d0fbb1 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,6 @@ +sonar.projectKey=City-of-Helsinki_puistotalkoot-api +sonar.organization=city-of-helsinki +sonar.python.version=3.9 +sonar.python.coverage.reportPaths=coverage.xml +sonar.test.inclusions=**/tests/**/* +sonar.exclusions=**/tests/**/* From 43e80afac9619ad6ba31d3ae34af154061b2688f Mon Sep 17 00:00:00 2001 From: Daniel Prange Date: Tue, 19 Nov 2024 10:29:19 +0200 Subject: [PATCH 4/7] ci: switch to CoH common reusable CI workflow --- .github/workflows/ci.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0d03200..3d55115 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,14 +1,17 @@ name: CI + on: push: branches: [main] pull_request: + branches: [main] + workflow_dispatch: + jobs: - common-ci: - # reusable workflow from .github -repository - # database-type: postgres / postgis - uses: City-of-Helsinki/.github/.github/workflows/ci-django-api.yml@reusable_workflow + common: + uses: City-of-Helsinki/.github/.github/workflows/ci-django-api.yml@main secrets: inherit with: python-version: 3.9 - database-type: postgis \ No newline at end of file + postgres-major-version: 13 + use-postgis: true From 24aa1bc4edd4ff707b2930304d6071e40d115c95 Mon Sep 17 00:00:00 2001 From: Daniel Prange Date: Tue, 19 Nov 2024 10:31:57 +0200 Subject: [PATCH 5/7] chore: convert commitlint config file to .mjs --- .commitlintrc.js => .commitlintrc.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .commitlintrc.js => .commitlintrc.mjs (97%) diff --git a/.commitlintrc.js b/.commitlintrc.mjs similarity index 97% rename from .commitlintrc.js rename to .commitlintrc.mjs index 4e715ad..ae4ffd1 100644 --- a/.commitlintrc.js +++ b/.commitlintrc.mjs @@ -1,4 +1,4 @@ -module.exports = { +export default { extends: [ '@commitlint/config-conventional' ], From dcd73b9395ecaae12bf877eacd54b87f8ef454c9 Mon Sep 17 00:00:00 2001 From: Daniel Prange Date: Tue, 19 Nov 2024 10:52:00 +0200 Subject: [PATCH 6/7] style: trim trailing whitespaces --- pipelines/puistotalkoot-api-review.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pipelines/puistotalkoot-api-review.yml b/pipelines/puistotalkoot-api-review.yml index 7570bb8..4465390 100644 --- a/pipelines/puistotalkoot-api-review.yml +++ b/pipelines/puistotalkoot-api-review.yml @@ -8,14 +8,14 @@ trigger: none # Pull request (PR) triggers cause a pipeline to run whenever a pull request is -# opened with one of the specified target branches, or when updates are made to +# opened with one of the specified target branches, or when updates are made to # such a pull request. # -# GitHub creates a new ref when a pull request is created. The ref points to a -# merge commit, which is the merged code between the source and target branches +# GitHub creates a new ref when a pull request is created. The ref points to a +# merge commit, which is the merged code between the source and target branches # of the pull request. # -# Opt out of pull request validation +# Opt out of pull request validation pr: # PR target branch branches: From d6a820f90cdca27cbe71fb3676bcd5ca06528f7b Mon Sep 17 00:00:00 2001 From: Daniel Prange Date: Tue, 19 Nov 2024 11:27:41 +0200 Subject: [PATCH 7/7] deps: update django-ilmoitin --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index be426a0..b091f36 100644 --- a/requirements.txt +++ b/requirements.txt @@ -65,7 +65,7 @@ django-filter==24.3 # djangorestframework-gis django-helusers==0.13.0 # via -r requirements.in -django-ilmoitin==0.7.0 +django-ilmoitin==0.7.1 # via -r requirements.in django-js-asset==2.2.0 # via django-mptt