diff --git a/.env.test b/.env.test new file mode 100644 index 0000000..f8481d8 --- /dev/null +++ b/.env.test @@ -0,0 +1,14 @@ +# user=password:user=password; +NUXT_LOCAL_AUTHS=usertest1=a5756f781e0e433986364b82de545c3b:usertest2=963a71f1868248df912e7488e02233f0 +NUXT_PUBLIC_LOCAL_AUTH_ENABLED=true +NUXT_APP_ENABLE_DRIZZLE_LOGGING=true +NUXT_DB_URL=http://localhost:8888 +NUXT_DB_AUTH_TOKEN=basic:c3FsZDppOHJ3ZXlzNzBkN2Zh +NUXT_S3_ENDPOINT=http://localhost:9000 +NUXT_S3_ACCESS_KEY_ID=minioadmin +NUXT_S3_SECRET_ACCESS_KEY=minioadmin +NUXT_JWT_KEY=5741sktf1xfv5qocbbnhsy7az2ny353e497wom8up5nggc3qbnjbu5bj5k9m3nv7 +NUXT_PUBLIC_GOOGLE_CLIENT_ID=sample-fc72420db46b4bfaaba8ea97a74535a7.apps.googleusercontent.com +NUXT_APP_MIGRATION_ENABLE=true +NUXT_APP_MIGRATION_DIR= +NUXT_APP_API_AUTH_KEY=dy9ea7v24f9f46j94p4xp1gcozwn1qcmgweb7kdzhuxi9br7gi89t2uy2r1896ag diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d613396..49c02b2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -18,6 +18,11 @@ jobs: # E2E tests + - name: Install minio + run: | + wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio_20241107005220.0.0_amd64.deb -O minio.deb + sudo dpkg -i minio.deb + - run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/tursodatabase/libsql/releases/download/libsql-server-v0.24.28/libsql-server-installer.sh | sh - name: Get installed Playwright version id: playwright-version run: | @@ -36,5 +41,6 @@ jobs: - name: Setup e2e env run: echo "${{ secrets.ENV_TESTS_BASE64 }}" | base64 --decode >> .env - run: bun run e2e + - name: Deploy run: curl -X POST https://api.cloudflare.com/client/v4/pages/webhooks/deploy_hooks/344ca361-b2d3-48e6-b896-ffa2dd1e9a1b diff --git a/.gitignore b/.gitignore index 8bc45fd..90cf942 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,5 @@ server/prisma-client/ prisma/app.db* test-results/ playwright/.auth + +.temp \ No newline at end of file diff --git a/docker-compose.env b/docker-compose.env index 45e3509..f06ee65 100644 --- a/docker-compose.env +++ b/docker-compose.env @@ -1,6 +1,6 @@ # Generate key using openssl rand -base64 32 -NUXT_LOCAL_AUTHS=yunus1=a168746dc0bc427b9aac07a0c40c2efc;yunus2=d920d57cc4684580bee7f8db3a29e57c +NUXT_LOCAL_AUTHS=usertest1=a168746dc0bc427b9aac07a0c40c2efc:usertest2=d920d57cc4684580bee7f8db3a29e57c NUXT_PUBLIC_LOCAL_AUTH_ENABLED=true NUXT_APP_ENABLE_DRIZZLE_LOGGING=true NUXT_DB_URL=libsql://libsql.turso.io diff --git a/package.json b/package.json index f4f786a..0edc1df 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,8 @@ "drizzle:generate": "drizzle-kit generate", "drizzle:migrate": "bun run server/db/migrate.ts", "deploy": "bun run build --preset=cloudflare-pages && npx wrangler pages deploy dist/", - "e2e": "NODE_OPTIONS=--require=dotenv/config playwright test", + "e2e": "playwright test", + "e2e-ui": "bun run e2e --ui-port=8080 --ui-host=127.0.0.1", "tests": "vitest test", "build-cli": "bun build cli/cli.ts --target node > cli/cli.mjs" }, diff --git a/pages/signin.vue b/pages/signin.vue index 04cc3db..7b3fa2b 100644 --- a/pages/signin.vue +++ b/pages/signin.vue @@ -8,7 +8,7 @@
-