Skip to content

Commit

Permalink
Merge pull request #218 from APIDevTools/fix-karma
Browse files Browse the repository at this point in the history
test: try using new karma
  • Loading branch information
philsturgeon committed May 13, 2022
2 parents 2dd8a00 + 282ddb0 commit 31b17f4
Show file tree
Hide file tree
Showing 5 changed files with 15,441 additions and 9,301 deletions.
31 changes: 15 additions & 16 deletions .github/workflows/CI-CD.yaml
Expand Up @@ -6,18 +6,16 @@
name: CI-CD

on:
push:
pull_request:
schedule:
- cron: "0 0 1 * *"
push:
branches: [main]

jobs:
node_tests:
name: Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: true
matrix:
os:
- ubuntu-latest
Expand All @@ -26,16 +24,16 @@ jobs:
node:
- 14
- 16
- 18

steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Node ${{ matrix.node }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'npm'

- name: Install dependencies
run: npm ci
Expand Down Expand Up @@ -63,26 +61,24 @@ jobs:
fail-fast: true
matrix:
os:
- ubuntu-latest # Chrome, Firefox, Safari (via SauceLabs), Edge (via SauceLabs)
- windows-latest # Internet Explorer
- ubuntu-latest # Chrome, Firefox, Safari (TODO)
# - windows-latest # Internet Explorer, Edge

steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 12
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm run coverage:browser
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}

- name: Combine code coverage data into a single file
shell: bash
Expand Down Expand Up @@ -121,10 +117,13 @@ jobs:

steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 12
cache: 'npm'

- name: Install dependencies
run: npm ci
Expand Down
1 change: 0 additions & 1 deletion README.md
Expand Up @@ -144,4 +144,3 @@ Thanks to these awesome companies for their support of Open Source developers
[![GitHub](https://apitools.dev/img/badges/github.svg)](https://github.com/open-source)
[![NPM](https://apitools.dev/img/badges/npm.svg)](https://www.npmjs.com/)
[![Coveralls](https://apitools.dev/img/badges/coveralls.svg)](https://coveralls.io)
[![SauceLabs](https://apitools.dev/img/badges/sauce-labs.svg)](https://saucelabs.com)
8 changes: 6 additions & 2 deletions karma.conf.js
Expand Up @@ -13,8 +13,12 @@ module.exports = karmaConfig({
browsers: {
chrome: host.ci ? host.os.linux : true,
firefox: host.ci ? host.os.linux : true,
// safari: host.ci ? host.os.linux : host.os.mac, // SauceLabs in CI
edge: host.ci ? host.os.linux : host.os.windows, // SauceLabs in CI
safari: false,
edge: false,
ie: false,
// Find a way to bring back these without using Saucelabs
// safari: host.ci ? host.os.linux : host.os.mac,
// edge: host.os.windows,
// ie: host.ci ? host.os.windows : true,
},
config: {
Expand Down

0 comments on commit 31b17f4

Please sign in to comment.