Skip to content

Commit

Permalink
chore: fix Firefox and Safari test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
smalluban committed Jan 9, 2024
1 parent ec6f8b1 commit ce1e6ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 19
node-version: 20
cache: "npm"
- uses: browser-actions/setup-chrome@latest
- uses: browser-actions/setup-firefox@latest

- name: Install dependencies
run: |
npm install
npx playwright install-deps webkit
npx playwright install firefox
- name: Run tests
run: |
npm run test
Expand Down
6 changes: 4 additions & 2 deletions karma.conf.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const playwright = require("playwright");

process.env.WEBKIT_HEADLESS_BIN = playwright.webkit.executablePath();
process.env.FIREFOX_BIN = playwright.firefox.executablePath();

const IS_COVERAGE = process.env.NODE_ENV === "coverage";

module.exports = (config) => {
Expand All @@ -10,7 +12,7 @@ module.exports = (config) => {
reporters: ["dots"].concat(IS_COVERAGE ? ["coverage"] : []),
browsers: IS_COVERAGE
? ["ChromeHeadless"]
: ["ChromeHeadless", "WebkitHeadless", "FirefoxHeadless"],
: ["ChromeHeadless", "FirefoxHeadless", "WebkitHeadless"],
client: {
captureConsole: false,
jasmine: {
Expand All @@ -34,7 +36,7 @@ module.exports = (config) => {
},
autoWatch: true,
singleRun: true,
concurrency: process.env.GITHUB_ACTIONS ? 1 : Infinity,
concurrency: 1,
port: 9876 + Number(IS_COVERAGE),
});
};

0 comments on commit ce1e6ba

Please sign in to comment.