diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0850de33c..13a1a0510 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -193,6 +193,7 @@ jobs: webapp-playwright-test: needs: [cli-and-doc, webapp-ubuntu] + # if: github.ref == 'refs/heads/master' timeout-minutes: 60 runs-on: ubuntu-latest steps: @@ -201,7 +202,10 @@ jobs: with: node-version: lts/* - name: Install dependencies - run: npm ci + run: | + npm ci + sudo apt-get update + sudo apt-get install lighttpd - name: Install Playwright Browsers run: npx playwright install --with-deps - name: Run Playwright tests diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml deleted file mode 100644 index 3eb13143c..000000000 --- a/.github/workflows/playwright.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Playwright Tests -on: - push: - branches: [ main, master ] - pull_request: - branches: [ main, master ] -jobs: - test: - timeout-minutes: 60 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: lts/* - - name: Install dependencies - run: npm ci - - name: Install Playwright Browsers - run: npx playwright install --with-deps - - name: Run Playwright tests - run: npx playwright test - - uses: actions/upload-artifact@v4 - if: ${{ !cancelled() }} - with: - name: playwright-report - path: playwright-report/ - retention-days: 30 diff --git a/playwright.config.ts b/playwright.config.ts index 029969854..ad0594ca4 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -75,7 +75,7 @@ export default defineConfig({ /* Run your local dev server before starting the tests */ webServer: { - command: 'lighttpd -f ~/inria/etc/lighttpd.conf -D', + command: 'lighttpd -f ./tests/playwright/lighttpd.conf -D', url: 'http://127.0.0.1:12345/index.html', // reuseExistingServer: !process.env.CI, }, diff --git a/tests/playwright/lighttpd.conf b/tests/playwright/lighttpd.conf new file mode 100644 index 000000000..974047caa --- /dev/null +++ b/tests/playwright/lighttpd.conf @@ -0,0 +1,8 @@ +include_shell "/usr/share/lighttpd/create-mime.conf.pl" + +server.document-root = "./build/site" + +server.port = 12345 + +server.username = "root" +server.groupname = "root"