Skip to content

Commit 82cf571

Browse files
committed
feat: working gihub action job to run browser tck
1 parent 36c069f commit 82cf571

File tree

5 files changed

+234
-29
lines changed

5 files changed

+234
-29
lines changed

.github/workflows/build.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,37 @@ jobs:
6666
- name: Test
6767
run: yarn test
6868

69+
browser-tck:
70+
runs-on: ubuntu-latest
71+
container: lironavon/docker-puppeteer-container:14.16.0
72+
73+
steps:
74+
- name: Checkout
75+
uses: actions/checkout@v2
76+
77+
- name: Install Node
78+
uses: actions/setup-node@v2
79+
with:
80+
node-version: 12
81+
82+
- name: Install Yarn
83+
run: npm install -g yarn
84+
85+
- name: Cache dependencies
86+
uses: actions/cache@v2
87+
with:
88+
path: ~/.yarn
89+
key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }}
90+
restore-keys: |
91+
${{ runner.OS }}-node-
92+
${{ runner.OS }}-
93+
94+
- name: Install dependencies
95+
run: yarn --frozen-lockfile
96+
97+
- name: Test
98+
run: yarn test-rsocket-browser-tck
99+
69100
compile:
70101
runs-on: ubuntu-latest
71102

packages/rsocket-browser-tck/karma.conf.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
process.env.CHROME_BIN = require("puppeteer").executablePath();
2+
13
module.exports = function (config) {
24
config.set({
35
frameworks: ["mocha", "karma-typescript"],
@@ -13,10 +15,19 @@ module.exports = function (config) {
1315

1416
reporters: ["mocha", "karma-typescript"],
1517

16-
browsers: ["ChromeHeadless"],
18+
browsers: ["ChromeHeadlessCI"],
1719

1820
singleRun: process.env.WATCH !== true,
1921

22+
customLaunchers: {
23+
ChromeHeadlessCI: {
24+
base: "ChromeHeadless",
25+
flags: [
26+
"--no-sandbox",
27+
],
28+
},
29+
},
30+
2031
karmaTypescriptConfig: {
2132
bundlerOptions: {
2233
addNodeGlobals: false,

packages/rsocket-browser-tck/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"karma-mocha-reporter": "^2.0.0",
2424
"karma-typescript": "5.5.3",
2525
"mocha": "^6.2.0",
26+
"puppeteer": "^13.1.1",
2627
"typescript": "~4.5.4"
2728
}
2829
}

tsconfig.build.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"noEmitOnError": true,
77
"skipLibCheck": true,
88
"esModuleInterop": true,
9-
"types": ["node", "jest", "mocha"],
9+
"types": ["node", "jest"],
1010
"declaration": true,
1111
"resolveJsonModule": true,
1212
"downlevelIteration": true

0 commit comments

Comments
 (0)