From a9d8e2ed41234e50862c3f8168365f27b4ef9525 Mon Sep 17 00:00:00 2001 From: Jeroen Zwartepoorte Date: Fri, 3 Jan 2025 15:45:15 +0100 Subject: [PATCH] Fix CI (#1694) --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/storybook.yml | 2 +- .github/workflows/website.yml | 4 ++-- package.json | 1 + web-test-runner.config.mjs | 9 ++++++++- yarn.lock | 19 ++++++++++--------- 7 files changed, 24 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76a6290f84..4e6d87a971 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 cache: 'yarn' # Set up GitHub Actions caching for Wireit. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e542ece009..466d71557e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,7 +29,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 cache: 'yarn' registry-url: 'https://npm.pkg.github.com' scope: '@sl-design-system' diff --git a/.github/workflows/storybook.yml b/.github/workflows/storybook.yml index e8114d4abc..dbf10aedb3 100644 --- a/.github/workflows/storybook.yml +++ b/.github/workflows/storybook.yml @@ -34,7 +34,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 cache: 'yarn' # Set up GitHub Actions caching for Wireit. diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index edbd8571b8..ff08aa8a9e 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -39,7 +39,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 cache: 'yarn' - run: yarn install --immutable - run: NODE_ENV=production yarn website @@ -57,7 +57,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 cache: 'yarn' - run: yarn install --immutable - run: NODE_ENV=production yarn website diff --git a/package.json b/package.json index e163134635..6caa09640a 100644 --- a/package.json +++ b/package.json @@ -463,6 +463,7 @@ "husky": "^9.1.7", "lint-staged": "^15.2.11", "lit": "^3.2.1", + "playwright": "^1.49.1", "sinon": "^19.0.2", "storybook": "^8.4.7", "stylelint": "^16.12.0", diff --git a/web-test-runner.config.mjs b/web-test-runner.config.mjs index 02bcb9e719..c49675fa7d 100644 --- a/web-test-runner.config.mjs +++ b/web-test-runner.config.mjs @@ -16,7 +16,14 @@ const config = { 'packages/components/**/src/**/*.spec.ts', ], - browsers: [playwrightLauncher({ product: 'chromium' })], + browsers: [ + playwrightLauncher({ + product: 'chromium' , + createBrowserContext({ browser }) { + return browser.newContext({ locale: 'en' }); + } + }) + ], plugins: [a11ySnapshotPlugin(), esbuildPlugin({ ts: true, tsconfig: './tsconfig.base.json' })], filterBrowserLogs: ({ type, args }) => { diff --git a/yarn.lock b/yarn.lock index c555c2238c..85ff182ddc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5205,6 +5205,7 @@ __metadata: husky: "npm:^9.1.7" lint-staged: "npm:^15.2.11" lit: "npm:^3.2.1" + playwright: "npm:^1.49.1" sinon: "npm:^19.0.2" storybook: "npm:^8.4.7" stylelint: "npm:^16.12.0" @@ -18265,27 +18266,27 @@ __metadata: languageName: node linkType: hard -"playwright-core@npm:1.47.1": - version: 1.47.1 - resolution: "playwright-core@npm:1.47.1" +"playwright-core@npm:1.49.1": + version: 1.49.1 + resolution: "playwright-core@npm:1.49.1" bin: playwright-core: cli.js - checksum: 10c0/c20f8f4fef2ce81fbe429d747fcb8a61564950b33e8d28ea51965fbfd7ddf0dcc4689efda056eed2666a5f511353a46570f18704962ccac62587c5351efa6396 + checksum: 10c0/990b619c75715cd98b2c10c1180a126e3a454b247063b8352bc67792fe01183ec07f31d30c8714c3768cefed12886d1d64ac06da701f2baafc2cad9b439e3919 languageName: node linkType: hard -"playwright@npm:^1.22.2": - version: 1.47.1 - resolution: "playwright@npm:1.47.1" +"playwright@npm:^1.22.2, playwright@npm:^1.49.1": + version: 1.49.1 + resolution: "playwright@npm:1.49.1" dependencies: fsevents: "npm:2.3.2" - playwright-core: "npm:1.47.1" + playwright-core: "npm:1.49.1" dependenciesMeta: fsevents: optional: true bin: playwright: cli.js - checksum: 10c0/45351f9c785c16000a39125b38e27e7ccf8b66fc63384cf8a77d8c6f8c7fdc7b2770a99802ab7ea5447a23630325e781852b08c08ed181f34cb595b60ae1f646 + checksum: 10c0/2368762c898920d4a0a5788b153dead45f9c36c3f5cf4d2af5228d0b8ea65823e3bbe998877950a2b9bb23a211e4633996f854c6188769dc81a25543ac818ab5 languageName: node linkType: hard