Skip to content

Commit

Permalink
Build: Enable GitHub CI
Browse files Browse the repository at this point in the history
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)
```
  • Loading branch information
Krinkle committed Aug 28, 2024
1 parent 472d327 commit 8a13158
Show file tree
Hide file tree
Showing 9 changed files with 88 additions and 8,712 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI
on:
- push
- pull_request

jobs:

test:
strategy:
fail-fast: false
matrix:
include:
- node: 14.x
- node: 16.x
- node: 18.x
- node: 20.x

name: Node.js ${{ matrix.node }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- run: npm install

- run: npm test

coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- run: npm install

- run: npm run coverage
25 changes: 25 additions & 0 deletions .github/workflows/browsers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Browsers
on:
push:
branches:
- main
# Or manually
workflow_dispatch:

jobs:

test:
runs-on: ubuntu-latest
if: ${{ github.repository == 'js-reporters/js-reporters' }} # skip on forks, needs secret
steps:
- uses: actions/checkout@v4

- run: npm install

- run: npm run lint

- run: npm run test-browser-sauce
env:
SAUCE_USERNAME: "${{ secrets.SAUCE_USERNAME }}"
SAUCE_REGION: "${{ secrets.SAUCE_REGION }}"
SAUCE_ACCESS_KEY: "${{ secrets.SAUCE_ACCESS_KEY }}"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
/node_modules
/log
/*.log
/package-lock.json
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# js-reporters

[![Chat on Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/js-reporters/js-reporters)
[![Build Status](https://travis-ci.com/js-reporters/js-reporters.svg?branch=main)](https://travis-ci.com/js-reporters/js-reporters)
[![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)
[![npm](https://img.shields.io/npm/dm/js-reporters.svg)](https://www.npmjs.com/package/js-reporters)
[![npm](https://img.shields.io/npm/v/js-reporters.svg)](https://www.npmjs.com/package/js-reporters)
[![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)
[![](https://img.shields.io/npm/dm/js-reporters.svg)](https://www.npmjs.com/package/js-reporters)
[![npm package](https://img.shields.io/npm/v/js-reporters.svg)](https://www.npmjs.com/package/js-reporters)

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

Expand Down
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module.exports = function (config) {
]
},
frameworks: ['qunit'],
browsers: ['FirefoxHeadless', process.platform === 'linux' && !process.env.CI ? 'ChromiumHeadless' : 'ChromeHeadless'],
browsers: ['FirefoxHeadless'],
singleRun: true,
autoWatch: false
});
Expand Down
15 changes: 8 additions & 7 deletions karma.conf.sauce.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ module.exports = function (config) {
region: process.env.SAUCE_REGION || 'us'
},
customLaunchers: {
firefox45: {
firefox78: {
base: 'SauceLabs',
browserName: 'firefox',
version: '45.0'
version: '78.0'
},
ie9: {
base: 'SauceLabs',
Expand Down Expand Up @@ -93,17 +93,18 @@ module.exports = function (config) {
edge: {
// Edge 80+ (Chromium)
base: 'SauceLabs',
browserName: 'MicrosoftEdge'
browserName: 'MicrosoftEdge',
version: 'latest'
},
chrome58: {
chrome80: {
base: 'SauceLabs',
browserName: 'chrome',
version: '58.0'
version: '80.0'
}
},
concurrency: 4,
browsers: [
'firefox45',
'firefox78',
'ie9',
'ie10',
'ie11',
Expand All @@ -112,7 +113,7 @@ module.exports = function (config) {
'safari',
'edge15',
'edge',
'chrome58'
'chrome80'
],
logLevel: 'WARN',
singleRun: true,
Expand Down
Loading

0 comments on commit 8a13158

Please sign in to comment.