fix: convert playwright config to JS, add git credentials to release push

This commit is contained in:
Jarian Cottingham 2026-07-08 01:50:34 +00:00 committed by Jarian
parent dbd00e4734
commit 8a77011e24
3 changed files with 6 additions and 5 deletions

View File

@ -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()

View File

@ -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}"

View File

@ -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,