Skip to content

Commit

Permalink
Add GitHub CI and remove Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
coditva committed Mar 6, 2024
1 parent f417489 commit 6fcc138
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 137 deletions.
95 changes: 95 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: CI

on:
push:
paths-ignore:
- 'docs/**'
- '*.md'
pull_request:
branches: [$default-branch]
schedule:
- cron: '0 12 * * 0'

jobs:
lint:
name: Lint
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'npm'

- name: Install
run: npm ci

- name: Run lint tests
run: npm run test-lint

browser-tests:
name: Browser Tests
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'npm'

- name: Install
run: npm ci

- name: Run browser tests
run: npm run test-browser

tests:
name: Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node-version: [10, 12]
os: [ubuntu-latest, windows-latest]
include:
- coverage: true
node-version: 16
os: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

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

- name: Install
run: npm ci

- name: Run system tests
run: npm run test-system

- name: Run unit tests
run: npm run test-unit

- if: ${{ matrix.coverage }}
name: Upload coverage
run: npm run codecov -- -c -Z -f .coverage/coverage-final.json -F unit

- name: Run integration tests
run: npm run test-integration

- if: ${{ matrix.coverage }}
name: Upload coverage
run: npm run codecov -- -c -Z -f .coverage/coverage-final.json -F integration
97 changes: 0 additions & 97 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Uniscope [![Build Status](https://travis-ci.com/postmanlabs/uniscope.svg?branch=develop)](https://travis-ci.com/postmanlabs/uniscope) [![codecov](https://codecov.io/gh/postmanlabs/uniscope/branch/develop/graph/badge.svg)](https://codecov.io/gh/postmanlabs/uniscope)
# Uniscope [![CI](https://github.com/postmanlabs/uniscope/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/postmanlabs/uniscope/actions/workflows/ci.yml) [![codecov](https://codecov.io/gh/postmanlabs/uniscope/branch/develop/graph/badge.svg)](https://codecov.io/gh/postmanlabs/uniscope)

The goal of this module is to provide a uniform execution environment to a JavaScript code between browser and NodeJS.<br/>
For example, global functions and objects in NodeJS such as `setImmediate` and `global` are not easily available to the script. And on the other hand, browser-specific global properties such as `requestAnimationFrame` and `window` is not available as well.
Expand Down
4 changes: 0 additions & 4 deletions npm/test-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ const path = require('path'),
KARMA_CONFIG_PATH = path.join(__dirname, '..', 'test', 'karma.conf');

module.exports = function (exit) {
if (process.env.TRAVIS_OS_NAME === 'windows') { // eslint-disable-line no-process-env
return console.info(chalk.yellow.bold('Skipping browser tests on windows...'));
}

console.info(chalk.yellow.bold('Running unit tests within browser...'));

(new KarmaServer({ // eslint-disable no-new
Expand Down
35 changes: 0 additions & 35 deletions test/system/travis-yml.test.js

This file was deleted.

0 comments on commit 6fcc138

Please sign in to comment.