Skip to content

Commit

Permalink
clean unit-tests and fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ga-ebp committed Feb 20, 2024
1 parent fa189de commit 3ff9624
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 96 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: CI

on:
push:
workflow_dispatch:

jobs:
Expand All @@ -16,10 +17,10 @@ jobs:
with:
node-version: 20
cache: 'npm'
- name: npm install, build, test, lint
run: |
npm ci
npm run build
npm run test
npm run lint

- run: npm ci
- run: npm run build
- run: npm run test
- run: npm run lint


33 changes: 21 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The following steps must be carried out once:
3. Set environment variables for dockers in `web-asset-swissgeol\development\.env`
4. Set environment variables for assets-server in `web-asset-swissgeol\apps\server-asset-sg\.env.local`
5. Create local postgis-gotrue docker-image `development\images\db> docker build -t postgis-gotrue .`
6. Creating elastic-search index. Execute in Kibana (`http://localhost:5601/app/dev_tools#/console`) the commands fro file `web-asset-swissgeol\development\init\elasticsearch\index`. --> docker must be started (see below)

### Starting the development environment

Expand All @@ -24,18 +25,26 @@ The following steps must be carried out once:

**The following services/applications are then available**

| 🔖 Dienst/Anwendung | 🔗Adresse | 🧞Benutzername | 🔐Passwort |
| :----------------------| :------------------------------------------------| :---------------------| :---------------------- |
| Assets | [localhost:4200](http://localhost:4200/) | `[email protected]` | `adminAssets` |
| Assets REST API | [localhost:3333/api/](http://localhost:3333/api) | n/a | n/a |
| postgresSQL (docker) | localhost:5432 | .env `$DB_USER` |.env `$DB_PASSWORD` |
| Elasticsearch (docker) | [localhost:9200](http://localhost:9200) | n/a | n/a |
| Kibana (docker) | [localhost:5601](http://localhost:5601) | n/a | n/a |
| pgAdmin (docker) | [localhost:5051](http://localhost:5051/) | .env `$PGADMIN_EMAIL` |.env `$PGADMIN_PASSWORD` |
| MinIO (docker) | [localhost:9001](http://localhost:9001/) | .env `$STORAGE_USER` |.env `$STORAGE_PASSWORD` |
| smtp4dev (docker) | [localhost:5000](http://localhost:5000/) | n/a | n/a |
| 🔖 App/Service | 🔗Link | 🧞User | 🔐Password |
| :---------------------- --| :------------------------------------------------| :---------------------| :---------------------- |
| Assets (client) | [localhost:4200](http://localhost:4200/) | `[email protected]` | `adminAssets` |
| Assets REST API (server) | [localhost:3333/api/](http://localhost:3333/api) | n/a | n/a |
| postgresSQL (docker) | localhost:5432 | .env `$DB_USER` |.env `$DB_PASSWORD` |
| Elasticsearch (docker) | [localhost:9200](http://localhost:9200) | n/a | n/a |
| Kibana (docker) | [localhost:5601](http://localhost:5601) | n/a | n/a |
| pgAdmin (docker) | [localhost:5051](http://localhost:5051/) | .env `$PGADMIN_EMAIL` |.env `$PGADMIN_PASSWORD` |
| MinIO (docker) | [localhost:9001](http://localhost:9001/) | .env `$STORAGE_USER` |.env `$STORAGE_PASSWORD` |
| smtp4dev (docker) | [localhost:5000](http://localhost:5000/) | n/a | n/a |

### Creating elastic-search index

1. Execute in Kibana (`http://localhost:5601/app/dev_tools#/console`) the commands fro file `web-asset-swissgeol\development\init\elasticsearch\index`.



### Commands in development environment

| Action | Command | Description |
| :------| :------------------------------------| :-----------------------------------------|
| start | `web-asset-swissgeol> npm run start` | Starts asset-client and asset-api. |
| build | `web-asset-swissgeol> npm run build` | Builds asset-client and asset-api. |
| test | `web-asset-swissgeol> npm run test` | Executes tests all apps and libs. |
| lint | `web-asset-swissgeol> npm run lint` | Analyzes the code from all apps and libs. |
2 changes: 1 addition & 1 deletion apps/client-asset-sg-e2e/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig } from 'cypress';
import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset';
import { defineConfig } from 'cypress';

export default defineConfig({
e2e: nxE2EPreset(__dirname),
Expand Down
31 changes: 0 additions & 31 deletions apps/client-asset-sg/src/app/app.component.spec.ts

This file was deleted.

22 changes: 0 additions & 22 deletions apps/server-asset-sg/src/app/app.controller.spec.ts

This file was deleted.

21 changes: 0 additions & 21 deletions apps/server-asset-sg/src/app/app.service.spec.ts

This file was deleted.

2 changes: 1 addition & 1 deletion libs/asset-viewer/src/lib/models/all-study-dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as D from 'io-ts/Decoder';
import * as TEq from 'io-ts/Eq';
import { Equals, assert } from 'tsafe';

import { AllStudyDTOFromAPI, eqLV95, LV95 } from '@asset-sg/shared';
import { AllStudyDTOFromAPI, LV95, eqLV95 } from '@asset-sg/shared';

export const AllStudyDTO = D.struct({
studyId: D.string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import * as C from 'io-ts/Codec';
import * as D from 'io-ts/Decoder';

import { CT } from '@asset-sg/core';
import { DateId, eqLV95, LV95 } from '@asset-sg/shared';
import { DateId, LV95, eqLV95 } from '@asset-sg/shared';

export const RefinementGeomCode = C.fromDecoder(
D.union(D.literal('Point'), D.literal('Polygon'), D.literal('LineString'), D.literal('None')),
Expand Down

0 comments on commit 3ff9624

Please sign in to comment.