mirror of
https://github.com/thiloho/archtika.git
synced 2025-11-22 02:41:35 +01:00
Run playwright tests on pull request as well
This commit is contained in:
4
.github/workflows/demo-server-deploy.yml
vendored
4
.github/workflows/demo-server-deploy.yml
vendored
@@ -2,8 +2,8 @@ name: Deploy app to demo server (demo.archtika.com)
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_run:
|
workflow_run:
|
||||||
workflows: ['Playwright tests']
|
workflows: [ 'Playwright tests' ]
|
||||||
types: [completed]
|
types: [ completed ]
|
||||||
env:
|
env:
|
||||||
SERVER_USER: root
|
SERVER_USER: root
|
||||||
SERVER_IP: 128.140.75.240
|
SERVER_IP: 128.140.75.240
|
||||||
|
|||||||
5
.github/workflows/playwright.yml
vendored
5
.github/workflows/playwright.yml
vendored
@@ -2,8 +2,9 @@ name: Playwright tests
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches: [ main ]
|
||||||
- main
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ CREATE FUNCTION internal.track_changes ()
|
|||||||
DECLARE
|
DECLARE
|
||||||
_website_id UUID;
|
_website_id UUID;
|
||||||
BEGIN
|
BEGIN
|
||||||
IF (to_jsonb (OLD.*) - 'last_modified_at') = (to_jsonb (NEW.*) - 'last_modified_at') OR (to_jsonb (OLD.*) - 'last_modified_by') = (to_jsonb (NEW.*) - 'last_modified_by') THEN
|
IF (to_jsonb (OLD.*) - 'last_modified_at') = (to_jsonb (NEW.*) - 'last_modified_at') THEN
|
||||||
RETURN NEW;
|
RETURN NEW;
|
||||||
END IF;
|
END IF;
|
||||||
IF TG_TABLE_NAME = 'website' THEN
|
IF TG_TABLE_NAME = 'website' THEN
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { redirect } from "@sveltejs/kit";
|
import { redirect } from "@sveltejs/kit";
|
||||||
import { API_BASE_PREFIX } from "$lib/server/utils";
|
import { API_BASE_PREFIX } from "$lib/server/utils";
|
||||||
|
import type { User } from "$lib/db-schema";
|
||||||
|
|
||||||
export const handle = async ({ event, resolve }) => {
|
export const handle = async ({ event, resolve }) => {
|
||||||
if (!event.url.pathname.startsWith("/api/")) {
|
if (!event.url.pathname.startsWith("/api/")) {
|
||||||
@@ -21,7 +22,7 @@ export const handle = async ({ event, resolve }) => {
|
|||||||
throw redirect(303, "/");
|
throw redirect(303, "/");
|
||||||
}
|
}
|
||||||
|
|
||||||
const user = await userData.json();
|
const user: User = await userData.json();
|
||||||
|
|
||||||
event.locals.user = user;
|
event.locals.user = user;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,9 @@
|
|||||||
<header>
|
<header>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<hgroup>
|
<hgroup>
|
||||||
<p>{article.publication_date}</p>
|
{#if article.publication_date}
|
||||||
|
<p>{article.publication_date}</p>
|
||||||
|
{/if}
|
||||||
<h1>{article.title}</h1>
|
<h1>{article.title}</h1>
|
||||||
</hgroup>
|
</hgroup>
|
||||||
{#if article.cover_image}
|
{#if article.cover_image}
|
||||||
|
|||||||
@@ -44,7 +44,9 @@
|
|||||||
{#each websiteOverview.article as article}
|
{#each websiteOverview.article as article}
|
||||||
{@const articleFileName = article.title.toLowerCase().split(" ").join("-")}
|
{@const articleFileName = article.title.toLowerCase().split(" ").join("-")}
|
||||||
<li>
|
<li>
|
||||||
<p>{article.publication_date}</p>
|
{#if article.publication_date}
|
||||||
|
<p>{article.publication_date}</p>
|
||||||
|
{/if}
|
||||||
<p>
|
<p>
|
||||||
<strong>
|
<strong>
|
||||||
<a href="./articles/{articleFileName}">{article.title}</a>
|
<a href="./articles/{articleFileName}">{article.title}</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user