Skip to content

Commit

Permalink
Replace Travis with a GitHub Actions CI workflow
Browse files Browse the repository at this point in the history
The backend Hypothesis projects have switched to using GitHub Actions
for CI. This does the same for the Hypothesis client.
  • Loading branch information
robertknight committed Aug 18, 2020
1 parent 2018da7 commit 1584476
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 23 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Continuous integration
on: [push]
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache the node_modules dir
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }}
- name: Install
run: yarn install --frozen-lockfile
- name: Format
run: yarn checkformatting
- name: Lint
run: yarn lint
- name: Typecheck
run: yarn typecheck
- name: Test
run: yarn test
17 changes: 0 additions & 17 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
@@ -1,12 +1,12 @@
Hypothesis client
=================

[![Build status](https://img.shields.io/travis/hypothesis/client/master.svg)][travis]
[![Continuous integration]](https://github.com/hypothesis/client/workflows/Continuous%20integration/badge.svg?branch=master)][gha]
[![npm version](https://img.shields.io/npm/v/hypothesis.svg)][npm]
[![#hypothes.is IRC channel](https://img.shields.io/badge/IRC-%23hypothes.is-blue.svg)][irc]
[![BSD licensed](https://img.shields.io/badge/license-BSD-blue.svg)][license]

[travis]: https://travis-ci.org/hypothesis/client
[gha]: https://github.com/hypothesis/client/actions?query=branch%3Amaster
[npm]: https://www.npmjs.com/package/hypothesis
[irc]: https://www.irccloud.com/invite?channel=%23hypothes.is&hostname=irc.freenode.net&port=6667&ssl=1
[license]: https://github.com/hypothesis/client/blob/master/LICENSE
Expand Down
7 changes: 3 additions & 4 deletions src/karma.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ let mochaOutputMode = 'minimal';

process.env.CHROME_BIN = require('puppeteer').executablePath();

// On Travis and in Docker, the tests run as root, so the sandbox must be
// disabled.
if (process.env.TRAVIS || process.env.RUNNING_IN_DOCKER) {
// In Docker, the tests run as root, so the sandbox must be disabled.
if (process.env.RUNNING_IN_DOCKER) {
chromeFlags.push('--no-sandbox');

// Enable debug logging from Chrome to help track down a cause of frequent
Expand Down Expand Up @@ -190,7 +189,7 @@ module.exports = function (config) {
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['ChromeHeadless_Custom'],
browserNoActivityTimeout: 20000, // Travis is slow...
browserNoActivityTimeout: 20000,

customLaunchers: {
ChromeHeadless_Custom: {
Expand Down

0 comments on commit 1584476

Please sign in to comment.