diff --git a/.github/workflows/tests-e2e.yml b/.github/workflows/tests-e2e.yml index 7330fccae16e..78c32c60627e 100644 --- a/.github/workflows/tests-e2e.yml +++ b/.github/workflows/tests-e2e.yml @@ -171,8 +171,14 @@ jobs: - name: Setup Bun uses: oven-sh/setup-bun@a1800f471a0bc25cddac36bb13e6f436ddf341d7 + - name: Setup Node + uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d + with: + node-version-file: '.nvmrc' + cache: npm + - name: Install dependencies - run: bun install puppeteer + run: npm install puppeteer env: PUPPETEER_PRODUCT: ${{ matrix.browser }} @@ -197,11 +203,12 @@ jobs: echo "validator_file=$AMP_VALIDATOR_FILE" >> $GITHUB_ENV - name: Run E2E tests - run: bun run test:e2e -- --shard=$SHARD + run: npx jest --runInBand --config=packages/e2e-tests/src/jest.config.js --shard=$SHARD env: WP_VERSION: ${{ matrix.wp }} SHARD: ${{ matrix.shard }} AMP_VALIDATOR_FILE: ${{ env.validator_file }} + JEST_PUPPETEER_CONFIG: jest-puppeteer.config.cjs - name: Stop Docker environment run: bun run env:stop diff --git a/.github/workflows/tests-unit-js.yml b/.github/workflows/tests-unit-js.yml index 739dcb7c5ca9..fdbadd91f6e3 100644 --- a/.github/workflows/tests-unit-js.yml +++ b/.github/workflows/tests-unit-js.yml @@ -94,7 +94,7 @@ jobs: echo "validator_file=$AMP_VALIDATOR_FILE" >> $GITHUB_ENV - name: Run JavaScript unit tests - run: bun run test:js -- --runInBand --ci --cacheDirectory="$HOME/.jest-cache" --collectCoverage --shard=$SHARD + run: bunx jest --config=tests/js/jest.config.js--runInBand --ci --cacheDirectory="$HOME/.jest-cache" --collectCoverage --shard=$SHARD env: SHARD: ${{ matrix.shard }} AMP_VALIDATOR_FILE: ${{ env.validator_file }} diff --git a/.github/workflows/tests-unit-php.yml b/.github/workflows/tests-unit-php.yml index e91e1464ab0b..1f815b8bc6c5 100644 --- a/.github/workflows/tests-unit-php.yml +++ b/.github/workflows/tests-unit-php.yml @@ -102,6 +102,9 @@ jobs: - name: Checkout uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 + - name: Setup Bun + uses: oven-sh/setup-bun@a1800f471a0bc25cddac36bb13e6f436ddf341d7 + # PHP-Scoper only works on PHP 7.4+ and we need to prefix our dependencies to accurately test them. # So we temporarily switch PHP versions, do a full install and then remove the package. # Then switch back to the PHP version we want to test and delete the vendor directory.