From 6d894d78bff79451bc8ef06cd7bcf00481a11d9c Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Tue, 15 Sep 2026 15:59:18 +0200 Subject: [PATCH] Cleaned up --- .github/workflows/project.yaml | 28 ++++++++++++++++++++++++++++ Taskfile.yml | 8 +++++++- src/Source/Osm/HandicapParking.php | 2 +- 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/project.yaml diff --git a/.github/workflows/project.yaml b/.github/workflows/project.yaml new file mode 100644 index 0000000..982a09a --- /dev/null +++ b/.github/workflows/project.yaml @@ -0,0 +1,28 @@ +name: Enter + +env: + COMPOSE_USER: runner + +on: + pull_request: + push: + branches: + - main + - develop + +jobs: + misc: + name: Miscellaneus + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: go-task/setup-task@v2 + + - name: Create docker network + run: docker network create frontend + + - name: Code analysis + run: task code-analysis + + - name: Run tests + run: task test diff --git a/Taskfile.yml b/Taskfile.yml index b781381..9ec546b 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -39,6 +39,12 @@ tasks: - if: '[ "$TASK_USE_DDEV" = "true" ]' cmd: ddev launch + test:start: + desc: 'Start services needed to run test' + internal: true + cmds: + - docker compose up --detach phpfpm --no-deps + test: desc: Run all tests cmds: @@ -50,6 +56,7 @@ tasks: env: APP_ENV: test desc: 'Run all {{.TASK | replace "test:" "" }} tests' + deps: [test:start] cmd: task: php vars: @@ -191,7 +198,6 @@ tasks: desc: 'Run code analysis' cmds: - task: code-analysis:phpstan - - task: code-analysis:mago code-analysis:phpstan: desc: 'Run PHPStan' diff --git a/src/Source/Osm/HandicapParking.php b/src/Source/Osm/HandicapParking.php index 889ae0a..632e79e 100644 --- a/src/Source/Osm/HandicapParking.php +++ b/src/Source/Osm/HandicapParking.php @@ -97,7 +97,7 @@ public function createNgsiEntity(array $data, Wgs84Transformer $transformer): ?N ->setProperty('category', $this->category($tags)) ->setProperty('totalSpotNumber', $this->reservedBays($tags)) ->setProperty('source', $this->definition->accessUrl) - ->geoProperty('location', $this->transformer->transformGeometry($this->definition->crs, $geometry)) + ->geoProperty('location', $transformer->transformGeometry($this->definition->crs, $geometry)) // Add custom attributes ->additionalInformation([