diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 292dae6..cecd9bc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -67,14 +67,19 @@ build: - .next/cache/ test:e2e: - image: - name: testcafe/testcafe:latest - entrypoint: ["/bin/sh", "-c"] + # Use a Cypress image which has Node 20 + Chrome and runs as root (solves permission issues) + image: cypress/browsers:node-20.14.0-chrome-125.0.6422.141-1-ff-126.0 needs: ["install", "build"] stage: test script: - # - sudo chown -R user:user . #allow deletion of test files + # No sudo needed if running as root. + # If permissions are still wrong, we CAN fix them because we are root. + # But usually, being root means we can overwrite/rm the files anyway. + + # 1. Clean install to ensure native modules match this container's environment - npm ci + + # 2. Run TestCafe (using the CI script for headless mode) - npm run testcafe:ci artifacts: paths: