@@ -580,26 +580,10 @@ jobs:
580
580
uses : ./.github/actions/restore-cache
581
581
env :
582
582
DEPENDENCY_CACHE_KEY : ${{ needs.job_build.outputs.dependency_cache_key }}
583
- - name : Get npm cache directory
584
- id : npm-cache-dir
585
- run : echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
586
- - name : Get Playwright version
587
- id : playwright-version
588
- run : echo "version=$(node -p "require('@playwright/test/package.json').version")" >> $GITHUB_OUTPUT
589
- - uses : actions/cache@v4
590
- name : Check if Playwright browser is cached
591
- id : playwright-cache
592
- with :
593
- path : ${{ steps.npm-cache-dir.outputs.dir }}
594
- key : ${{ runner.os }}-Playwright-${{steps.playwright-version.outputs.version}}
595
- - name : Install Playwright browser if not cached
596
- if : steps.playwright-cache.outputs.cache-hit != 'true'
597
- run : npx playwright install --with-deps
598
- env :
599
- PLAYWRIGHT_BROWSERS_PATH : ${{steps.npm-cache-dir.outputs.dir}}
600
- - name : Install OS dependencies of Playwright if cache hit
601
- if : steps.playwright-cache.outputs.cache-hit == 'true'
602
- run : npx playwright install-deps
583
+
584
+ - name : Install playwright
585
+ uses : ./.github/actions/install-playwright
586
+
603
587
- name : Run tests
604
588
env :
605
589
NODE_VERSION : ${{ matrix.node }}
@@ -670,26 +654,10 @@ jobs:
670
654
uses : ./.github/actions/restore-cache
671
655
env :
672
656
DEPENDENCY_CACHE_KEY : ${{ needs.job_build.outputs.dependency_cache_key }}
673
- - name : Get npm cache directory
674
- id : npm-cache-dir
675
- run : echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
676
- - name : Get Playwright version
677
- id : playwright-version
678
- run : echo "version=$(node -p "require('@playwright/test/package.json').version")" >> $GITHUB_OUTPUT
679
- - uses : actions/cache@v4
680
- name : Check if Playwright browser is cached
681
- id : playwright-cache
682
- with :
683
- path : ${{ steps.npm-cache-dir.outputs.dir }}
684
- key : ${{ runner.os }}-Playwright-${{steps.playwright-version.outputs.version}}
685
- - name : Install Playwright browser if not cached
686
- if : steps.playwright-cache.outputs.cache-hit != 'true'
687
- run : npx playwright install --with-deps
688
- env :
689
- PLAYWRIGHT_BROWSERS_PATH : ${{steps.npm-cache-dir.outputs.dir}}
690
- - name : Install OS dependencies of Playwright if cache hit
691
- if : steps.playwright-cache.outputs.cache-hit == 'true'
692
- run : npx playwright install-deps
657
+
658
+ - name : Install playwright
659
+ uses : ./.github/actions/install-playwright
660
+
693
661
- name : Run Playwright tests
694
662
env :
695
663
PW_BUNDLE : ${{ matrix.bundle }}
@@ -733,26 +701,10 @@ jobs:
733
701
uses : ./.github/actions/restore-cache
734
702
env :
735
703
DEPENDENCY_CACHE_KEY : ${{ needs.job_build.outputs.dependency_cache_key }}
736
- - name : Get npm cache directory
737
- id : npm-cache-dir
738
- run : echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
739
- - name : Get Playwright version
740
- id : playwright-version
741
- run : echo "version=$(node -p "require('@playwright/test/package.json').version")" >> $GITHUB_OUTPUT
742
- - uses : actions/cache@v4
743
- name : Check if Playwright browser is cached
744
- id : playwright-cache
745
- with :
746
- path : ${{ steps.npm-cache-dir.outputs.dir }}
747
- key : ${{ runner.os }}-Playwright-${{steps.playwright-version.outputs.version}}
748
- - name : Install Playwright browser if not cached
749
- if : steps.playwright-cache.outputs.cache-hit != 'true'
750
- run : npx playwright install --with-deps
751
- env :
752
- PLAYWRIGHT_BROWSERS_PATH : ${{steps.npm-cache-dir.outputs.dir}}
753
- - name : Install OS dependencies of Playwright if cache hit
754
- if : steps.playwright-cache.outputs.cache-hit == 'true'
755
- run : npx playwright install-deps
704
+
705
+ - name : Install playwright
706
+ uses : ./.github/actions/install-playwright
707
+
756
708
- name : Run Playwright Loader tests
757
709
env :
758
710
PW_BUNDLE : ${{ matrix.bundle }}
0 commit comments