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

Create a GitHub CI Action #20

Merged
merged 4 commits into from
Oct 8, 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 12
uses: actions/setup-node@v2
with:
node-version: '12'

- name: Install dependencies
run: npm install

- name: Build
run: npm run build --if-present

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

This file was deleted.

9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,9 @@
src="https://img.shields.io/github/tag/chaijs/check-error.svg?style=flat-square"
/>
</a>
<a href="https://travis-ci.org/chaijs/check-error">
<img
alt="build:?"
src="https://img.shields.io/travis/chaijs/check-error/master.svg?style=flat-square"
/>
</a>

![example workflow](https://github.com/chaijs/check-error/actions/workflows/nodejs.yml/badge.svg)

<a href="https://coveralls.io/r/chaijs/check-error">
<img
alt="coverage:?"
Expand Down
9 changes: 3 additions & 6 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,17 @@ module.exports = function configureKarma(config) {
});

if (process.env.SAUCE_ACCESS_KEY && process.env.SAUCE_USERNAME) {
var branch = process.env.TRAVIS_BRANCH || 'local';
var branch = 'local';
var build = 'localbuild';
if (process.env.TRAVIS_JOB_NUMBER) {
build = 'travis@' + process.env.TRAVIS_JOB_NUMBER;
}
config.reporters.push('saucelabs');
config.set({
customLaunchers: sauceLabsBrowsers,
browsers: localBrowsers.concat(Object.keys(sauceLabsBrowsers)),
sauceLabs: {
testName: packageJson.name,
tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER || new Date().getTime(),
tunnelIdentifier: new Date().getTime(),
recordVideo: true,
startConnect: ('TRAVIS' in process.env) === false,
startConnect: true,
tags: [
'checkError_' + packageJson.version,
process.env.SAUCE_USERNAME + '@' + branch,
Expand Down
Loading