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
appurva21 committed Apr 8, 2024
1 parent 7d63e75 commit 35efa64
Show file tree
Hide file tree
Showing 8 changed files with 92 additions and 137 deletions.
Binary file removed .github/travis-deploy-key.enc
Binary file not shown.
87 changes: 87 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,87 @@
name: CI

on:
push:
paths-ignore:
- '*.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
1 change: 0 additions & 1 deletion .npmignore
Expand Up @@ -48,6 +48,5 @@ test/
.eslintrc
.nycrc.js
codecov.yml
.travis.yml
.editorconfig
.jsdoc-config.json
96 changes: 0 additions & 96 deletions .travis.yml

This file was deleted.

4 changes: 4 additions & 0 deletions CHANGELOG.yaml
@@ -1,3 +1,7 @@
unreleased:
chores:
- Add GitHub CI and remove Travis

2.1.1:
date: 2022-07-12
fixed bugs:
Expand Down
2 changes: 1 addition & 1 deletion README.md
@@ -1,4 +1,4 @@
# UVM [![Build Status](https://travis-ci.com/postmanlabs/uvm.svg?branch=develop)](https://travis-ci.com/postmanlabs/uvm) [![codecov](https://codecov.io/gh/postmanlabs/uvm/branch/develop/graph/badge.svg)](https://codecov.io/gh/postmanlabs/uvm)
# UVM [![CI](https://github.com/postmanlabs/uvm/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/postmanlabs/uvm/actions/workflows/ci.yml) [![codecov](https://codecov.io/gh/postmanlabs/uvm/branch/develop/graph/badge.svg)](https://codecov.io/gh/postmanlabs/uvm)

Module that exposes an event emitter to send data across contexts ([VM](https://nodejs.org/api/vm.html) in Node.js and [Web Workers](https://www.w3.org/TR/workers/) in browser).

Expand Down
4 changes: 0 additions & 4 deletions npm/test-browser.js
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 35efa64

Please sign in to comment.