Skip to content

Commit 8a13158

Browse files
committed
Build: Enable GitHub CI
In package.json, add an override for `@types/puppeteer-core` from 5.x to 7.0.4 because 5.x had an absurd dependency on `puppeteer: *` instead of `puppeteer-code: *`, thus despite having absolutely no need for a copy of Headless Chrome or Puppeteer, it was being downloaded in full, and thus crash CI builds due to the old binary no longer being installable. How? ``` - karma-launcher-saucelabs - webdriverio 6.12 - @types/puppeteer-core 5.x - puppeteer * (latest) ```
1 parent 472d327 commit 8a13158

9 files changed

+88
-8712
lines changed

.github/workflows/CI.yaml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI
2+
on:
3+
- push
4+
- pull_request
5+
6+
jobs:
7+
8+
test:
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
include:
13+
- node: 14.x
14+
- node: 16.x
15+
- node: 18.x
16+
- node: 20.x
17+
18+
name: Node.js ${{ matrix.node }}
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Install Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: ${{ matrix.node }}
27+
28+
- run: npm install
29+
30+
- run: npm test
31+
32+
coverage:
33+
name: Coverage
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v4
37+
38+
- run: npm install
39+
40+
- run: npm run coverage

.github/workflows/browsers.yaml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Browsers
2+
on:
3+
push:
4+
branches:
5+
- main
6+
# Or manually
7+
workflow_dispatch:
8+
9+
jobs:
10+
11+
test:
12+
runs-on: ubuntu-latest
13+
if: ${{ github.repository == 'js-reporters/js-reporters' }} # skip on forks, needs secret
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- run: npm install
18+
19+
- run: npm run lint
20+
21+
- run: npm run test-browser-sauce
22+
env:
23+
SAUCE_USERNAME: "${{ secrets.SAUCE_USERNAME }}"
24+
SAUCE_REGION: "${{ secrets.SAUCE_REGION }}"
25+
SAUCE_ACCESS_KEY: "${{ secrets.SAUCE_ACCESS_KEY }}"

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
/node_modules
55
/log
66
/*.log
7+
/package-lock.json

.travis.yml

-20
This file was deleted.

README.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
# js-reporters
22

33
[![Chat on Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/js-reporters/js-reporters)
4-
[![Build Status](https://travis-ci.com/js-reporters/js-reporters.svg?branch=main)](https://travis-ci.com/js-reporters/js-reporters)
5-
[![Coverage Status](https://coveralls.io/repos/github/js-reporters/js-reporters/badge.svg?branch=main)](https://coveralls.io/github/js-reporters/js-reporters?branch=main)
6-
[![npm](https://img.shields.io/npm/dm/js-reporters.svg)](https://www.npmjs.com/package/js-reporters)
7-
[![npm](https://img.shields.io/npm/v/js-reporters.svg)](https://www.npmjs.com/package/js-reporters)
4+
[![Build status](https://github.com/js-reporters/js-reporters/actions/workflows/CI.yaml/badge.svg)](https://github.com/js-reporters/js-reporters/actions/workflows/CI.yaml)
5+
[![](https://img.shields.io/npm/dm/js-reporters.svg)](https://www.npmjs.com/package/js-reporters)
6+
[![npm package](https://img.shields.io/npm/v/js-reporters.svg)](https://www.npmjs.com/package/js-reporters)
87

98
The Common Reporter Interface (CRI) for JavaScript Testing Frameworks.
109

karma.conf.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ module.exports = function (config) {
4444
]
4545
},
4646
frameworks: ['qunit'],
47-
browsers: ['FirefoxHeadless', process.platform === 'linux' && !process.env.CI ? 'ChromiumHeadless' : 'ChromeHeadless'],
47+
browsers: ['FirefoxHeadless'],
4848
singleRun: true,
4949
autoWatch: false
5050
});

karma.conf.sauce.js

+8-7
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ module.exports = function (config) {
5050
region: process.env.SAUCE_REGION || 'us'
5151
},
5252
customLaunchers: {
53-
firefox45: {
53+
firefox78: {
5454
base: 'SauceLabs',
5555
browserName: 'firefox',
56-
version: '45.0'
56+
version: '78.0'
5757
},
5858
ie9: {
5959
base: 'SauceLabs',
@@ -93,17 +93,18 @@ module.exports = function (config) {
9393
edge: {
9494
// Edge 80+ (Chromium)
9595
base: 'SauceLabs',
96-
browserName: 'MicrosoftEdge'
96+
browserName: 'MicrosoftEdge',
97+
version: 'latest'
9798
},
98-
chrome58: {
99+
chrome80: {
99100
base: 'SauceLabs',
100101
browserName: 'chrome',
101-
version: '58.0'
102+
version: '80.0'
102103
}
103104
},
104105
concurrency: 4,
105106
browsers: [
106-
'firefox45',
107+
'firefox78',
107108
'ie9',
108109
'ie10',
109110
'ie11',
@@ -112,7 +113,7 @@ module.exports = function (config) {
112113
'safari',
113114
'edge15',
114115
'edge',
115-
'chrome58'
116+
'chrome80'
116117
],
117118
logLevel: 'WARN',
118119
singleRun: true,

0 commit comments

Comments
 (0)