From 59d0545808ba060ca778e90d80435afe646b075a Mon Sep 17 00:00:00 2001 From: Jarian Cottingham Date: Wed, 8 Jul 2026 01:50:34 +0000 Subject: [PATCH] fix: convert playwright config to JS, add git credentials to release push --- .gitea/workflows/ci.yml | 4 ++-- .gitea/workflows/release.yml | 3 ++- .../playwright/{playwright.config.ts => playwright.config.js} | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) rename tests/playwright/{playwright.config.ts => playwright.config.js} (80%) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index c3e264a..c66f23d 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -175,12 +175,12 @@ jobs: docker run --rm \ --network newsarchiver-network \ -v $GITHUB_WORKSPACE/tests/playwright/tests:/tests/tests \ - -v $GITHUB_WORKSPACE/tests/playwright/playwright.config.ts:/tests/playwright.config.ts \ + -v $GITHUB_WORKSPACE/tests/playwright/playwright.config.js:/tests/playwright.config.js \ -w /tests \ -e APP_URL=http://newsarchiver-e2e:${APP_PORT} \ -e PLAYWRIGHT_BROWSERS_PATH=/ms-playwright \ mcr.microsoft.com/playwright:v1.51.0-jammy \ - sh -c "npm install @playwright/test@1.51.0 && npx playwright@1.51.0 test" + sh -c "npm install @playwright/test@1.51.0 && npx playwright test" - name: Cleanup if: always() diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 3845d9b..b0d46de 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -18,7 +18,7 @@ jobs: - name: Clone repo run: | rm -rf $GITHUB_WORKSPACE/* - git clone --depth 1 $GITEA_URL/$GITHUB_REPOSITORY $GITHUB_WORKSPACE + git clone --depth 1 https://user:pass@git.example.com/${{ github.repository }} $GITHUB_WORKSPACE git -C $GITHUB_WORKSPACE checkout main - name: Read version @@ -67,6 +67,7 @@ jobs: git config user.name "CI Release Bot" git add version.json git commit -m "release: bump to ${FULL}" + git remote set-url origin https://user:pass@git.example.com/${{ github.repository }} git push origin main git tag -a "v${FULL}" -m "release: ${FULL}" diff --git a/tests/playwright/playwright.config.ts b/tests/playwright/playwright.config.js similarity index 80% rename from tests/playwright/playwright.config.ts rename to tests/playwright/playwright.config.js index 576d5c5..321220e 100644 --- a/tests/playwright/playwright.config.ts +++ b/tests/playwright/playwright.config.js @@ -1,6 +1,6 @@ -import { defineConfig } from '@playwright/test'; +const { defineConfig } = require('@playwright/test'); -export default defineConfig({ +module.exports = defineConfig({ testDir: './tests', fullyParallel: true, forbidOnly: !!process.env.CI,