Skip to content

Commit 43e5d8c

Browse files
committed
Adjust specs so they work using act
1 parent b90586d commit 43e5d8c

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

bin/before_install

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
#!/bin/bash
22

33
if [ -n "$ACT" ]; then
4+
# Install yarn
45
curl -o- -L https://yarnpkg.com/install.sh | bash
56
echo "$HOME/.yarn/bin" >> $GITHUB_PATH
67
echo "$HOME/.config/yarn/global/node_modules/.bin" >> $GITHUB_PATH
8+
9+
# Install google-chrome-stable
10+
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
11+
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
12+
sudo apt-get update -y
13+
sudo apt-get install -y google-chrome-stable
14+
echo
715
fi

karma.conf.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,22 @@ module.exports = function (config) {
55
frameworks: ['mocha', 'chai', 'sinon', 'chai-sinon'],
66
colors: true,
77
autoWatch: true,
8-
browsers: ['ChromeHeadless'],
98
singleRun: false,
109
concurrency: Infinity,
1110
// level of logging
1211
// possible values: config.LOG_DISABLE || config.LOG_ERROR ||
1312
// config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
1413
logLevel: config.LOG_INFO,
1514

15+
// Run chrome with --no-sandbox because in ACT we don't have sudo access
16+
browsers: ['CustomChromeHeadless'],
17+
customLaunchers: {
18+
CustomChromeHeadless: {
19+
base: 'ChromeHeadless',
20+
flags: ['--no-sandbox']
21+
}
22+
},
23+
1624
// list of files / patterns to load in the browser
1725
files: [
1826
{pattern: './dist/app.js'},

0 commit comments

Comments
 (0)