|
32 | 32 | ${{ github.workspace }}/node_modules |
33 | 33 | ${{ github.workspace }}/packages/*/node_modules |
34 | 34 | ${{ github.workspace }}/dev-packages/*/node_modules |
35 | | - ~/.cache/ms-playwright/ |
36 | 35 | ~/.cache/mongodb-binaries/ |
37 | 36 |
|
38 | 37 | # DEPENDENCY_CACHE_KEY: can't be set here because we don't have access to yarn.lock |
@@ -659,26 +658,10 @@ jobs: |
659 | 658 | uses: ./.github/actions/restore-cache |
660 | 659 | env: |
661 | 660 | DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }} |
662 | | - - name: Get npm cache directory |
663 | | - id: npm-cache-dir |
664 | | - run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT |
665 | | - - name: Get Playwright version |
666 | | - id: playwright-version |
667 | | - run: echo "version=$(node -p "require('@playwright/test/package.json').version")" >> $GITHUB_OUTPUT |
668 | | - - uses: actions/cache@v4 |
669 | | - name: Check if Playwright browser is cached |
670 | | - id: playwright-cache |
671 | | - with: |
672 | | - path: ${{ steps.npm-cache-dir.outputs.dir }} |
673 | | - key: ${{ runner.os }}-Playwright-${{steps.playwright-version.outputs.version}} |
674 | | - - name: Install Playwright browser if not cached |
675 | | - if: steps.playwright-cache.outputs.cache-hit != 'true' |
676 | | - run: npx playwright install --with-deps |
677 | | - env: |
678 | | - PLAYWRIGHT_BROWSERS_PATH: ${{steps.npm-cache-dir.outputs.dir}} |
679 | | - - name: Install OS dependencies of Playwright if cache hit |
680 | | - if: steps.playwright-cache.outputs.cache-hit == 'true' |
681 | | - run: npx playwright install-deps |
| 661 | + |
| 662 | + - name: Install Playwright |
| 663 | + uses: ./.github/actions/install-playwright |
| 664 | + |
682 | 665 | - name: Run Playwright tests |
683 | 666 | env: |
684 | 667 | PW_BUNDLE: ${{ matrix.bundle }} |
@@ -723,26 +706,10 @@ jobs: |
723 | 706 | uses: ./.github/actions/restore-cache |
724 | 707 | env: |
725 | 708 | DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }} |
726 | | - - name: Get npm cache directory |
727 | | - id: npm-cache-dir |
728 | | - run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT |
729 | | - - name: Get Playwright version |
730 | | - id: playwright-version |
731 | | - run: echo "version=$(node -p "require('@playwright/test/package.json').version")" >> $GITHUB_OUTPUT |
732 | | - - uses: actions/cache@v4 |
733 | | - name: Check if Playwright browser is cached |
734 | | - id: playwright-cache |
735 | | - with: |
736 | | - path: ${{ steps.npm-cache-dir.outputs.dir }} |
737 | | - key: ${{ runner.os }}-Playwright-${{steps.playwright-version.outputs.version}} |
738 | | - - name: Install Playwright browser if not cached |
739 | | - if: steps.playwright-cache.outputs.cache-hit != 'true' |
740 | | - run: npx playwright install --with-deps |
741 | | - env: |
742 | | - PLAYWRIGHT_BROWSERS_PATH: ${{steps.npm-cache-dir.outputs.dir}} |
743 | | - - name: Install OS dependencies of Playwright if cache hit |
744 | | - if: steps.playwright-cache.outputs.cache-hit == 'true' |
745 | | - run: npx playwright install-deps |
| 709 | + |
| 710 | + - name: Install Playwright |
| 711 | + uses: ./.github/actions/install-playwright |
| 712 | + |
746 | 713 | - name: Run Playwright Loader tests |
747 | 714 | env: |
748 | 715 | PW_BUNDLE: ${{ matrix.bundle }} |
@@ -854,6 +821,8 @@ jobs: |
854 | 821 | uses: ./.github/actions/restore-cache |
855 | 822 | env: |
856 | 823 | DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }} |
| 824 | + - name: Install Playwright |
| 825 | + uses: ./.github/actions/install-playwright |
857 | 826 | - name: Run integration tests |
858 | 827 | env: |
859 | 828 | NODE_VERSION: ${{ matrix.node }} |
@@ -1052,6 +1021,9 @@ jobs: |
1052 | 1021 | path: ${{ github.workspace }}/packages/*/*.tgz |
1053 | 1022 | key: ${{ env.BUILD_CACHE_TARBALL_KEY }} |
1054 | 1023 |
|
| 1024 | + - name: Install Playwright |
| 1025 | + uses: ./.github/actions/install-playwright |
| 1026 | + |
1055 | 1027 | - name: Get node version |
1056 | 1028 | id: versions |
1057 | 1029 | run: | |
@@ -1146,6 +1118,9 @@ jobs: |
1146 | 1118 | path: ${{ github.workspace }}/packages/*/*.tgz |
1147 | 1119 | key: ${{ env.BUILD_CACHE_TARBALL_KEY }} |
1148 | 1120 |
|
| 1121 | + - name: Install Playwright |
| 1122 | + uses: ./.github/actions/install-playwright |
| 1123 | + |
1149 | 1124 | - name: Get node version |
1150 | 1125 | id: versions |
1151 | 1126 | run: | |
@@ -1243,6 +1218,9 @@ jobs: |
1243 | 1218 | key: ${{ env.BUILD_CACHE_TARBALL_KEY }} |
1244 | 1219 | fail-on-cache-miss : true |
1245 | 1220 |
|
| 1221 | + - name: Install Playwright |
| 1222 | + uses: ./.github/actions/install-playwright |
| 1223 | + |
1246 | 1224 | - name: Get node version |
1247 | 1225 | id: versions |
1248 | 1226 | run: | |
|
0 commit comments