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 a GitHub action for CI #147

Merged
merged 2 commits into from
Sep 26, 2021
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
44 changes: 44 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build

on:
pull_request:
push:
branches:
- master

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Get sources
uses: actions/checkout@v1

- name: Restore npm cache
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-modules-
- name: Use Node.js 14
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Install dependencies
run: npm install

- name: Build
run: npm run build

- name: Test
run: npm run test
env:
CI: true
71 changes: 0 additions & 71 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
src="https://img.shields.io/npm/v/type-detect.svg?style=flat-square"
/>
</a>
<a href="https://travis-ci.org/chaijs/type-detect">
<a href="https://github.com/chaijs/type-detect">
<img
alt="build:?"
src="https://img.shields.io/travis/chaijs/type-detect/master.svg?style=flat-square"
src="https://github.com/chaijs/type-detect/workflows/Build/badge.svg"
/>
</a>
<a href="https://coveralls.io/r/chaijs/type-detect">
Expand Down
8 changes: 1 addition & 7 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if (process.env.SAUCE_USERNAME) {
startConnect = true;
} else if (process.env.APPVEYOR) {
browsers = [ 'Firefox', 'ChromeHeadless', 'IE' ];
} else if (process.env.TRAVIS) {
} else if (process.env.CI) {
browsers = [ 'FirefoxHeadless', 'ChromeHeadlessNoSandbox' ];
} else if (!process.env.KARMA_MANUAL) {
browsers = [];
Expand All @@ -28,12 +28,6 @@ if (process.env.APPVEYOR) {
branch = process.env.APPVEYOR_REPO_BRANCH;
build = `appveyor@${ process.env.APPVEYOR_JOB_NUMBER }`;
job = process.env.APPVEYOR_JOB_NUMBER;
} else if (process.env.TRAVIS) {
branch = process.env.TRAVIS_BRANCH;
build = `travis@${ process.env.TRAVIS_JOB_NUMBER }`;
job = process.env.TRAVIS_JOB_NUMBER;
// Travis has its own saucelabs connect process, so ensure karma won't run it
startConnect = false;
}
/* eslint-enable */

Expand Down