diff --git a/.github/workflows/ci-integration-tests.yml b/.github/workflows/ci-integration-tests.yml index 5e8bbc944a..c9d0dbb31c 100644 --- a/.github/workflows/ci-integration-tests.yml +++ b/.github/workflows/ci-integration-tests.yml @@ -32,11 +32,20 @@ jobs: run: mkdir -p /tmp/log/YaST2 - name: Start container - run: podman run --privileged --detach --name agama --ipc=host -e CI -e GITHUB_ACTIONS -v /dev:/dev -v .:/checkout -v /tmp/log/YaST2:/var/log/YaST2 registry.opensuse.org/systemsmanagement/agama/staging/containers/opensuse/agama-testing:latest + run: podman run --privileged --detach --name agama --ipc=host -e CI -e GITHUB_ACTIONS -v /dev:/dev -v .:/checkout -v /tmp/log/YaST2:/var/log/YaST2 registry.opensuse.org/systemsmanagement/agama/devel/containers/opensuse/agama-testing:latest - name: Environment run: podman exec agama bash -c "env | sort" + - name: Packages + run: podman exec agama bash -c "rpm -qa | sort" + + - name: Debug + # the testing script behaves differently when running in a Git checkout, + # remove the .git directory so it behaves like on the Live ISO + # (Puppeteer is installed using an RPM, not by "npm install" as in git) + run: podman exec agama bash -c "agama-integration-tests /checkout/puppeteer/tests/test_root_password.js" + - name: Set a testing Agama configuration # delete all products except TW to skip the product selection at the beginning run: podman exec agama bash -c "ls /checkout/products.d/*.yaml | grep -v tumbleweed.yaml | xargs rm" @@ -68,13 +77,11 @@ jobs: - name: Run the Agama smoke test run: podman exec agama curl http://localhost - - name: Check Playwright version - run: podman exec agama playwright --version - - - name: Run the Playwright tests - # user authentication is not required when cockpit runs a local session - # run the tests in the Chromium browser - run: podman exec agama bash -c "cd /checkout/playwright && SKIP_LOGIN=true playwright test --trace on --project chromium" + - name: Run the Puppeteer tests + # the testing script behaves differently when running in a Git checkout, + # remove the .git directory so it behaves like on the Live ISO + # (Puppeteer is installed using an RPM, not by "npm install" as in git) + run: podman exec agama bash -c "cd checkout && rm -rf .git && ./puppeteer/agama-integration-tests ./puppeteer/tests/test_root_password.js" - name: Again show the D-Bus services log # run even when any previous step fails @@ -89,7 +96,7 @@ jobs: name: test-results retention-days: 30 path: | - playwright/test-results/**/* + puppeteer/log/**/* /tmp/log/YaST2/y2log - name: IRC notification diff --git a/puppeteer/agama-integration-tests b/puppeteer/agama-integration-tests index 2617846ef6..9ec09358d5 100755 --- a/puppeteer/agama-integration-tests +++ b/puppeteer/agama-integration-tests @@ -6,7 +6,7 @@ set -eu MYDIR=$(realpath "$(dirname "$0")") if [ -e "$MYDIR/../.git/" ]; then - PUPPETEER_SKIP_DOWNLOAD=true npm install --omit=optional + npm install --omit=optional npx mocha --bail "$@" else # set the default load path