mirror of
https://github.com/openpgpjs/openpgpjs.git
synced 2025-11-23 22:15:52 +00:00
CI: run browser tests also on Windows
This commit is contained in:
parent
6b1da73b97
commit
0f586241e8
8
.github/workflows/tests.yml
vendored
8
.github/workflows/tests.yml
vendored
@ -63,8 +63,7 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
# run on all main platforms to test platform-specific code, if present
|
# run on all main platforms to test platform-specific code, if present
|
||||||
# (e.g. webkit's WebCrypto API implementation is different in macOS vs Linux)
|
# (e.g. webkit's WebCrypto API implementation is different in macOS vs Linux)
|
||||||
# TODO: windows-latest fails to fetch resources from the wtr server; investigate if the problem is with path declaration or permissions
|
runner: ['ubuntu-latest', 'macos-latest', 'windows-latest']
|
||||||
runner: ['ubuntu-latest', 'macos-latest']
|
|
||||||
runs-on: ${{ matrix.runner }}
|
runs-on: ${{ matrix.runner }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -79,6 +78,7 @@ jobs:
|
|||||||
dist
|
dist
|
||||||
test/lib
|
test/lib
|
||||||
key: cache-${{ github.sha }}
|
key: cache-${{ github.sha }}
|
||||||
|
enableCrossOsArchive: true
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
# cannot use `--ignore-scripts` since playwright seems to use it to set ENV vars
|
# cannot use `--ignore-scripts` since playwright seems to use it to set ENV vars
|
||||||
@ -88,13 +88,15 @@ jobs:
|
|||||||
|
|
||||||
- name: Get Playwright version and cache location
|
- name: Get Playwright version and cache location
|
||||||
id: playwright-version
|
id: playwright-version
|
||||||
|
if: ${{ matrix.runner != 'windows-latest' }} # setting env vars does not work in windows, it'd require custom handling
|
||||||
run: |
|
run: |
|
||||||
PLAYWRIGHT_VERSION=$(npm ls playwright --depth=0 | grep playwright | sed 's/.*@//')
|
PLAYWRIGHT_VERSION=$(npx playwright --version | sed 's/^Version //')
|
||||||
echo "version=$PLAYWRIGHT_VERSION" >> $GITHUB_OUTPUT
|
echo "version=$PLAYWRIGHT_VERSION" >> $GITHUB_OUTPUT
|
||||||
PLAYWRIGHT_CACHE=${{ fromJSON('{"ubuntu-latest": "~/.cache/ms-playwright", "macos-latest": "~/Library/Caches/ms-playwright"}')[matrix.runner] }}
|
PLAYWRIGHT_CACHE=${{ fromJSON('{"ubuntu-latest": "~/.cache/ms-playwright", "macos-latest": "~/Library/Caches/ms-playwright"}')[matrix.runner] }}
|
||||||
echo "playwright_cache=$PLAYWRIGHT_CACHE" >> $GITHUB_OUTPUT
|
echo "playwright_cache=$PLAYWRIGHT_CACHE" >> $GITHUB_OUTPUT
|
||||||
- name: Check for cached browsers
|
- name: Check for cached browsers
|
||||||
id: cache-playwright-browsers
|
id: cache-playwright-browsers
|
||||||
|
if: ${{ matrix.runner != 'windows-latest' }}
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.playwright-version.outputs.playwright_cache }}
|
path: ${{ steps.playwright-version.outputs.playwright_cache }}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user