From e760ae74143592ac2f05c3591ef56751e10d2543 Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 25 Jun 2024 10:07:36 +0200 Subject: [PATCH 01/20] add quality checks --- .github/dependabot.yml | 24 ++++++++ .github/workflows/quality.yml | 109 ++++++++++++++++++++++++++++++++++ 2 files changed, 133 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/quality.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..460710c --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,24 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" # Location of package manifests + schedule: + interval: "weekly" + + - package-ecosystem: "pip" + directory: "backend/" # Location of package manifests + schedule: + interval: "weekly" + ignore: + - dependency-name: "django" + update-types: [ "version-update:semver-major", "version-update:semver-minor" ] # only allow auto update on django bug and security fixes + + - package-ecosystem: "npm" + directory: "front-end/" # Location of package manifests + schedule: + interval: "weekly" diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml new file mode 100644 index 0000000..f6cd4a0 --- /dev/null +++ b/.github/workflows/quality.yml @@ -0,0 +1,109 @@ +name: Quality checks + +on: + pull_request: + push: + branches: + - master + - main + - next + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + DEBIAN_FRONTEND: noninteractive + +jobs: + flake8: + name: Python Flake8 check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + cache: 'pip' + cache-key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt', 'dev-requirements.txt') }} + + - name: Install flake8 + run: | + pip install flake8 -c dev-requirements.txt + + - name: Flake8 + run: | + flake8 project + + isort: + name: Python iSort check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + cache: 'pip' + cache-key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt', 'dev-requirements.txt') }} + + - name: Install isort + run: | + pip install isort -c dev-requirements.txt + + - name: iSort + run: | + isort -c project + + black: + name: Python Black check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + cache: 'pip' + cache-key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt', 'dev-requirements.txt') }} + + - name: Install black + run: | + pip install black -c dev-requirements.txt + + - name: black + run: | + black --check project + + prettier: + name: JS Prettier check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: ./front-end/.nvmrc + cache: 'npm' + cache-dependency-path: ./front-end/.nvmrc + + - name: Install node dependencies + run: | + npm ci + + - name: Type check + run: | + npm run format:check + + type: + name: JS Type check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: ./front-end/.nvmrc + cache: 'npm' + cache-dependency-path: ./front-end/.nvmrc + + - name: Install node dependencies + run: | + npm ci + + - name: Type check + run: | + npm run type:check From dd2923c83fabcd8ac9784108fa5f9e6b5f0430bf Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 25 Jun 2024 10:29:21 +0200 Subject: [PATCH 02/20] add quality checks --- .github/workflows/quality.yml | 12 +++++++++--- front-end/.nvmrc | 1 + 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 front-end/.nvmrc diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index f6cd4a0..e948afc 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -24,13 +24,15 @@ jobs: - uses: actions/setup-python@v5 with: cache: 'pip' - cache-key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt', 'dev-requirements.txt') }} + cache-key: ${{ runner.os }}-pip-${{ hashFiles('./backend/requirements.txt', './backend/dev-requirements.txt') }} - name: Install flake8 + working-directory: ./backend run: | pip install flake8 -c dev-requirements.txt - name: Flake8 + working-directory: ./backend run: | flake8 project @@ -42,13 +44,15 @@ jobs: - uses: actions/setup-python@v5 with: cache: 'pip' - cache-key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt', 'dev-requirements.txt') }} + cache-key: ${{ runner.os }}-pip-${{ hashFiles('./backend/requirements.txt', './backend/dev-requirements.txt') }} - name: Install isort + working-directory: ./backend run: | pip install isort -c dev-requirements.txt - name: iSort + working-directory: ./backend run: | isort -c project @@ -60,13 +64,15 @@ jobs: - uses: actions/setup-python@v5 with: cache: 'pip' - cache-key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt', 'dev-requirements.txt') }} + cache-key: ${{ runner.os }}-pip-${{ hashFiles('./backend/requirements.txt', './backend/dev-requirements.txt') }} - name: Install black + working-directory: ./backend run: | pip install black -c dev-requirements.txt - name: black + working-directory: ./backend run: | black --check project diff --git a/front-end/.nvmrc b/front-end/.nvmrc new file mode 100644 index 0000000..209e3ef --- /dev/null +++ b/front-end/.nvmrc @@ -0,0 +1 @@ +20 From d0b67e60d42ae1b5ef2ee27b74d93f6f2ea4963d Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 25 Jun 2024 10:38:53 +0200 Subject: [PATCH 03/20] add quality checks --- .github/workflows/quality.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index e948afc..9e8addb 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -88,10 +88,12 @@ jobs: cache-dependency-path: ./front-end/.nvmrc - name: Install node dependencies + working-directory: ./front-end run: | npm ci - name: Type check + working-directory: ./front-end run: | npm run format:check @@ -107,9 +109,11 @@ jobs: cache-dependency-path: ./front-end/.nvmrc - name: Install node dependencies + working-directory: ./front-end run: | npm ci - name: Type check + working-directory: ./front-end run: | npm run type:check From 5510a29616c40bb9d065e0c65a7e1860bb0c7033 Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 25 Jun 2024 10:51:00 +0200 Subject: [PATCH 04/20] fix package.json --- front-end/package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/front-end/package.json b/front-end/package.json index 5e6e1e6..e8a2e71 100644 --- a/front-end/package.json +++ b/front-end/package.json @@ -2,6 +2,9 @@ "name": "regard-d-altitude", "version": "0.0.0", "scripts": { + "type:check": "tsc --noEmit", + "format:write": "prettier --write \"**/*.{ts,tsx,mdx}\" --cache", + "format:check": "prettier --check \"**/*.{ts,tsx,mdx}\" --cache", "ng": "ng", "start": "ng serve", "build": "ng build", From 51c6cfd94715bf15fc152dd0a583cdbc0e6e417b Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 25 Jun 2024 11:20:08 +0200 Subject: [PATCH 05/20] optimize quality --- .github/workflows/quality.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 9e8addb..5b2763f 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -90,7 +90,7 @@ jobs: - name: Install node dependencies working-directory: ./front-end run: | - npm ci + npm ci --no-audit - name: Type check working-directory: ./front-end @@ -111,7 +111,7 @@ jobs: - name: Install node dependencies working-directory: ./front-end run: | - npm ci + npm ci --no-audit - name: Type check working-directory: ./front-end From dae1fc66a626d7c9895c1a275478b6d8794642fc Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 25 Jun 2024 11:23:16 +0200 Subject: [PATCH 06/20] optimize quality --- .github/workflows/quality.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 5b2763f..ce2b2f9 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -23,8 +23,11 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - cache: 'pip' - cache-key: ${{ runner.os }}-pip-${{ hashFiles('./backend/requirements.txt', './backend/dev-requirements.txt') }} + python-version-file: ./backend/.python-version + cache: 'pip' + cache-dependency-path: | + ./backend/requirements.txt + ./backend/dev-requirements.txt - name: Install flake8 working-directory: ./backend @@ -43,8 +46,11 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - cache: 'pip' - cache-key: ${{ runner.os }}-pip-${{ hashFiles('./backend/requirements.txt', './backend/dev-requirements.txt') }} + python-version-file: ./backend/.python-version + cache: 'pip' + cache-dependency-path: | + ./backend/requirements.txt + ./backend/dev-requirements.txt - name: Install isort working-directory: ./backend @@ -63,8 +69,11 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - cache: 'pip' - cache-key: ${{ runner.os }}-pip-${{ hashFiles('./backend/requirements.txt', './backend/dev-requirements.txt') }} + python-version-file: ./backend/.python-version + cache: 'pip' + cache-dependency-path: | + ./backend/requirements.txt + ./backend/dev-requirements.txt - name: Install black working-directory: ./backend From 1b11908ccb32c8eb033ba84245184a9b6c16f7ae Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 25 Jun 2024 11:26:45 +0200 Subject: [PATCH 07/20] optimize quality --- .github/workflows/quality.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index ce2b2f9..01cd3e9 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -101,7 +101,7 @@ jobs: run: | npm ci --no-audit - - name: Type check + - name: Prettier check working-directory: ./front-end run: | npm run format:check From 8c39846ad9c5d77e9afbb6c8c471f6688f3b249b Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 25 Jun 2024 11:26:51 +0200 Subject: [PATCH 08/20] add tests --- .github/workflows/test.yml | 75 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..7f6b49f --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,75 @@ +name: Tests + +on: + pull_request: + push: + branches: + - master + - main + - next + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + DEBIAN_FRONTEND: noninteractive + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + CI: false + +jobs: + python-unittests: + name: Python Unit tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version-file: ./backend/.python-version + cache: 'pip' + cache-dependency-path: | + ./backend/requirements.txt + ./backend/dev-requirements.txt + + js-build: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: ./front-end/.nvmrc + cache: 'npm' + cache-dependency-path: ./front-end/.nvmrc + + - name: Install node dependencies + working-directory: ./front-end + run: | + npm ci --no-audit + + - name: Type check + working-directory: ./front-end + run: | + npm run format:check + + docker-build: + - name: Checkout + uses: actions/checkout@v4 + + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + file: .docker/Dockerfile + push: false + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + target: prod + From e01848fd023ad4e751066c8376e8aee4331af048 Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 25 Jun 2024 11:28:04 +0200 Subject: [PATCH 09/20] fix tests --- .github/workflows/test.yml | 70 +++++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 32 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7f6b49f..95f09fd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,43 +33,49 @@ jobs: ./backend/dev-requirements.txt js-build: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version-file: ./front-end/.nvmrc - cache: 'npm' - cache-dependency-path: ./front-end/.nvmrc + name: JS tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: ./front-end/.nvmrc + cache: 'npm' + cache-dependency-path: ./front-end/.nvmrc - - name: Install node dependencies - working-directory: ./front-end - run: | - npm ci --no-audit + - name: Install node dependencies + working-directory: ./front-end + run: | + npm ci --no-audit - - name: Type check - working-directory: ./front-end - run: | - npm run format:check + - name: Type check + working-directory: ./front-end + run: | + npm run format:check docker-build: - - name: Checkout - uses: actions/checkout@v4 + name: Docker build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - - name: Build and push - uses: docker/build-push-action@v6 - with: - context: . - file: .docker/Dockerfile - push: false - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - target: prod + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + file: .docker/Dockerfile + push: false + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + target: prod From 1cf9644eb07afbd18d2802cb7020a3b6c6ec6ea4 Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 25 Jun 2024 11:30:32 +0200 Subject: [PATCH 10/20] fix tests --- .github/workflows/test.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 95f09fd..f3dae99 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,6 +31,10 @@ jobs: cache-dependency-path: | ./backend/requirements.txt ./backend/dev-requirements.txt + - name: Install dependencies + working-directory: ./backend + run: | + pip install -r requirements.txt -r dev-requirements.txt js-build: name: JS tests @@ -48,10 +52,10 @@ jobs: run: | npm ci --no-audit - - name: Type check + - name: npm build working-directory: ./front-end run: | - npm run format:check + npm run build docker-build: name: Docker build From 729c93f0de0348d556c6e8bf52189addc03ea251 Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 25 Jun 2024 11:39:16 +0200 Subject: [PATCH 11/20] fix tests --- .github/release.yml | 22 ++++++++++++++++++++++ .github/workflows/quality.yml | 12 ------------ .github/workflows/test.yml | 1 + 3 files changed, 23 insertions(+), 12 deletions(-) create mode 100644 .github/release.yml diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..c3cef6b --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,22 @@ +changelog: + categories: + - title: ๐ŸŽ‰ Features + labels: + - '*' + exclude: + labels: + - dependencies + - Bug + - documentation + + - title: ๐Ÿ›  Bug fixes + labels: + - 'Bug' + + - title: ๐Ÿ“˜ Documentation + labels: + - documentation + + - title: โคด Dependencies + labels: + - dependencies diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 01cd3e9..4862cdc 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -24,10 +24,6 @@ jobs: - uses: actions/setup-python@v5 with: python-version-file: ./backend/.python-version - cache: 'pip' - cache-dependency-path: | - ./backend/requirements.txt - ./backend/dev-requirements.txt - name: Install flake8 working-directory: ./backend @@ -47,10 +43,6 @@ jobs: - uses: actions/setup-python@v5 with: python-version-file: ./backend/.python-version - cache: 'pip' - cache-dependency-path: | - ./backend/requirements.txt - ./backend/dev-requirements.txt - name: Install isort working-directory: ./backend @@ -70,10 +62,6 @@ jobs: - uses: actions/setup-python@v5 with: python-version-file: ./backend/.python-version - cache: 'pip' - cache-dependency-path: | - ./backend/requirements.txt - ./backend/dev-requirements.txt - name: Install black working-directory: ./backend diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f3dae99..489bdb9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,6 +31,7 @@ jobs: cache-dependency-path: | ./backend/requirements.txt ./backend/dev-requirements.txt + - name: Install dependencies working-directory: ./backend run: | From ff71966ed03219d9cbca1872af003b1312683312 Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 25 Jun 2024 14:18:30 +0200 Subject: [PATCH 12/20] fix tests --- .github/workflows/test.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 489bdb9..56c459e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,6 +37,18 @@ jobs: run: | pip install -r requirements.txt -r dev-requirements.txt + - name: Run django unit tests + working-directory: ./backend + run: | + coverage run ./manage.py test --parallel + coverage xml + + - uses: codecov/codecov-action@v4 + working-directory: ./backend + with: + files: ./coverage.xml + flags: python-unittests + js-build: name: JS tests runs-on: ubuntu-latest From 4698d8e5059fc0b2f878527afc2f44247469d820 Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 25 Jun 2024 15:31:07 +0200 Subject: [PATCH 13/20] fix tests --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 56c459e..be22c80 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,9 +44,9 @@ jobs: coverage xml - uses: codecov/codecov-action@v4 - working-directory: ./backend + working-directory: with: - files: ./coverage.xml + files: ./backend/coverage.xml flags: python-unittests js-build: From da4a039e278b24515432bff77f1feef542f40780 Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 25 Jun 2024 15:45:01 +0200 Subject: [PATCH 14/20] fix tests --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index be22c80..921a1d4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,11 +40,11 @@ jobs: - name: Run django unit tests working-directory: ./backend run: | - coverage run ./manage.py test --parallel - coverage xml + coverage run --parallel-mode --concurrency=multiprocessing ./manage.py test --parallel -v 3 + coverage combine + coverage xml -o coverage.xml - uses: codecov/codecov-action@v4 - working-directory: with: files: ./backend/coverage.xml flags: python-unittests From 80b39abf263ca6920743014b3bba39284ae5b6df Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 25 Jun 2024 15:46:55 +0200 Subject: [PATCH 15/20] fix tests --- .github/workflows/test.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 921a1d4..2f1ae1f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,6 +32,12 @@ jobs: ./backend/requirements.txt ./backend/dev-requirements.txt + - name: Install system libraries + working-directory: ./backend + run: | + sudo apt-get -qq update + sudo apt-get -qq install -y libpq-dev gdal-bin gettext + - name: Install dependencies working-directory: ./backend run: | From a6c277c345191463ed1cf5dee62b4945cb0b28cd Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 25 Jun 2024 16:06:15 +0200 Subject: [PATCH 16/20] fix tests --- .github/workflows/test.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2f1ae1f..8b1ccb4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,6 +17,18 @@ env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} CI: false + POSTGRES_DB: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_USER: postgres + +services: + postgres: + image: postgis/postgis:16-3.4 + ports: + - 5432:5432 + # Set health checks to wait until postgres has started + options: >- + --health-cmd pg_isready jobs: python-unittests: @@ -54,6 +66,7 @@ jobs: with: files: ./backend/coverage.xml flags: python-unittests + token: ${{ secrets.CODECOV_TOKEN }} js-build: name: JS tests From 730c4aa94ae60a45f5887f03eae28be0699e5161 Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 25 Jun 2024 16:21:43 +0200 Subject: [PATCH 17/20] fix tests --- .github/workflows/test.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8b1ccb4..a7a0aa1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,16 +21,16 @@ env: POSTGRES_PASSWORD: postgres POSTGRES_USER: postgres -services: - postgres: - image: postgis/postgis:16-3.4 - ports: - - 5432:5432 - # Set health checks to wait until postgres has started - options: >- - --health-cmd pg_isready - jobs: + services: + postgres: + image: postgis/postgis:16-3.4 + ports: + - 5432:5432 + # Set health checks to wait until postgres has started + options: >- + --health-cmd pg_isready + python-unittests: name: Python Unit tests runs-on: ubuntu-latest From 9d6d851fdbb3a99a0b2d0dc0be605441efd11ec1 Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 25 Jun 2024 16:40:21 +0200 Subject: [PATCH 18/20] fix tests --- .github/workflows/test.yml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a7a0aa1..28b37ba 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,23 +17,25 @@ env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} CI: false - POSTGRES_DB: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_USER: postgres jobs: - services: - postgres: - image: postgis/postgis:16-3.4 - ports: - - 5432:5432 - # Set health checks to wait until postgres has started - options: >- - --health-cmd pg_isready - python-unittests: name: Python Unit tests runs-on: ubuntu-latest + env: + POSTGRES_DB: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_USER: postgres + + services: + postgres: + image: postgis/postgis:16-3.4 + ports: + - 5432:5432 + # Set health checks to wait until postgres has started + options: >- + --health-cmd pg_isready + steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 From 5baab978250833bf1f34456b9d4895b7102e72a0 Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 25 Jun 2024 16:40:58 +0200 Subject: [PATCH 19/20] fix tests --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 28b37ba..36d66d4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,6 +26,7 @@ jobs: POSTGRES_DB: postgres POSTGRES_PASSWORD: postgres POSTGRES_USER: postgres + POSTGRES_HOST: 127.0.0.1 services: postgres: From 1307e3cbc7f4cc4cc3b47d0724ed4aa58e50c429 Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 25 Jun 2024 16:43:10 +0200 Subject: [PATCH 20/20] fix tests --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 36d66d4..b5880b1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,6 +31,10 @@ jobs: services: postgres: image: postgis/postgis:16-3.4 + env: + POSTGRES_DB: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_USER: postgres ports: - 5432:5432 # Set health checks to wait until postgres has started