From 8179c83383756006fb2cb4429ce1ddb6b61e5d94 Mon Sep 17 00:00:00 2001 From: ThetaDev Date: Mon, 20 May 2024 22:59:27 +0200 Subject: [PATCH 1/3] update README --- README.md | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1f1a26e..5eec35a 100644 --- a/README.md +++ b/README.md @@ -9,16 +9,24 @@ The project template was created using [`create-svelte`](https://github.com/svel Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: ```bash -npm run dev +pnpm run dev # or start the server and open the app in a new browser tab -npm run dev -- --open +pnpm run dev -- --open ``` -### Handle the prisma ORM +### Test environment + +The project depends on a PostgreSQL database and an OIDC authentication server. +You can setup both using the `run/db_up.sh` script. This creates a new testing environment using +docker-compose and fills the test database with mock data + +### Use the Pisma ORM + +If you apply changes to the database scheme, you have to create a new migration to apply these changes to +the database. ```bash -./run/db_up.sh # Start the docker container, create a new database and run migrations + insert test data npx prisma migrate dev --name my_migration --create-only # Create a new migration npx prisma migrate dev # Apply migrations to the database ``` @@ -28,13 +36,21 @@ npx prisma migrate dev # Apply migrations to the database To create a production version of your app: ```bash -npm run build +pnpm run build ``` You can preview the production build with `npm run preview`. > To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. +### Test + +```bash +pnpm test # Unit- und Integrationstests +pnpm test:e2e # End2End-Tests +``` + + ### Release To release a new version, tun the release script with the new version as a parameter @@ -42,3 +58,10 @@ To release a new version, tun the release script with the new version as a param ```bash ./release.sh 1.0.0 ``` + +### Building docker image + +```bash +pnpm run build +docker build -t thetadev256/visitenbuch . +``` From 297f5cfa925925956b7951ef3afeff7058971f30 Mon Sep 17 00:00:00 2001 From: ThetaDev Date: Tue, 21 May 2024 03:58:13 +0200 Subject: [PATCH 2/3] update README --- README.md | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 5eec35a..cc42fac 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,11 @@ for the university hospital in Augsburg ## Development -The project template was created using [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). +The project template was created using +[`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: +Once you've created a project and installed dependencies with `npm install` (or +`pnpm install` or `yarn`), start a development server: ```bash pnpm run dev @@ -17,14 +19,17 @@ pnpm run dev -- --open ### Test environment -The project depends on a PostgreSQL database and an OIDC authentication server. -You can setup both using the `run/db_up.sh` script. This creates a new testing environment using -docker-compose and fills the test database with mock data +Copy the `.env.example` file to `.env` to get access to the required configuration +variables. + +The project depends on a PostgreSQL database and an OIDC authentication server. You can +setup both using the `run/db_up.sh` script. This creates a new testing environment using +docker-compose and fills the test database with mock data. ### Use the Pisma ORM -If you apply changes to the database scheme, you have to create a new migration to apply these changes to -the database. +If you apply changes to the database scheme, you have to create a new migration to apply +these changes to the database. ```bash npx prisma migrate dev --name my_migration --create-only # Create a new migration @@ -41,7 +46,8 @@ pnpm run build You can preview the production build with `npm run preview`. -> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. +> To deploy your app, you may need to install an +> [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. ### Test @@ -50,7 +56,6 @@ pnpm test # Unit- und Integrationstests pnpm test:e2e # End2End-Tests ``` - ### Release To release a new version, tun the release script with the new version as a parameter From 4cbf1ca7c3d4e5a604095ef3a8913ec54f32e4ea Mon Sep 17 00:00:00 2001 From: ThetaDev Date: Fri, 24 May 2024 17:49:06 +0200 Subject: [PATCH 3/3] ci: set fetch-depth to 0 --- .forgejo/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/ci.yaml b/.forgejo/workflows/ci.yaml index d2ea852..c286741 100644 --- a/.forgejo/workflows/ci.yaml +++ b/.forgejo/workflows/ci.yaml @@ -68,7 +68,7 @@ jobs: - name: 👁️ Checkout repository uses: actions/checkout@v4 with: - fetch-depth: 1 # important to fetch tag logs + fetch-depth: 0 # important to fetch tag logs - name: 📦 pnpm install run: pnpm install