File tree 1 file changed +26
-0
lines changed
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 59
59
- name : Install dependencies
60
60
run : pnpm install
61
61
62
+ # Install playwright's binary under custom directory to cache
63
+ - name : (non-windows) Set Playwright path and Get playwright version
64
+ if : runner.os != 'Windows'
65
+ run : |
66
+ echo "PLAYWRIGHT_BROWSERS_PATH=$HOME/.cache/playwright-bin" >> $GITHUB_ENV
67
+ PLAYWRIGHT_VERSION="$(pnpm ls --depth 0 --json -w playwright | jq --raw-output '.[0].unsavedDependencies["playwright"].version')"
68
+ echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV
69
+
70
+ - name : (windows) Set Playwright path and Get playwright version
71
+ if : runner.os == 'Windows'
72
+ run : |
73
+ echo "PLAYWRIGHT_BROWSERS_PATH=$HOME\.cache\playwright-bin" >> $env:GITHUB_ENV
74
+ $env:PLAYWRIGHT_VERSION="$(pnpm ls --depth 0 --json -w playwright | jq --raw-output '.[0].unsavedDependencies[\"playwright\"].version')"
75
+ echo "PLAYWRIGHT_VERSION=$env:PLAYWRIGHT_VERSION" >> $env:GITHUB_ENV
76
+
77
+ - name : Cache Playwright's binary
78
+ uses : actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
79
+ with :
80
+ key : ${{ runner.os }}-playwright-bin-v1-${{ env.PLAYWRIGHT_VERSION }}
81
+ path : ${{ env.PLAYWRIGHT_BROWSERS_PATH }}
82
+ restore-keys : |
83
+ ${{ runner.os }}-playwright-bin-v1-
84
+
85
+ - name : Install Playwright
86
+ run : pnpm playwright-core install chromium
87
+
62
88
- name : Build module
63
89
run : pnpm prepack
64
90
You can’t perform that action at this time.
0 commit comments