Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub CI and remove Travis #667

Merged
merged 1 commit into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .github/travis-deploy-key.enc
Binary file not shown.
87 changes: 87 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
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.

Loading