Skip to content

Commit

Permalink
Merge pull request #1 from higlass/github-actions
Browse files Browse the repository at this point in the history
Move to Github actions
  • Loading branch information
alexander-veit authored Feb 25, 2021
2 parents c285060 + 89c8672 commit 7d58b3c
Show file tree
Hide file tree
Showing 6 changed files with 364 additions and 171 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: sudo apt-get install xvfb
- run: npm ci
- run: npm run build --if-present
- run: xvfb-run --auto-servernum npm run test
env:
CI: true
39 changes: 39 additions & 0 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Node.js Package

on:
push:
tags:
- "v*"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: sudo apt-get install xvfb
- run: npm ci
- run: npm run build --if-present
- run: xvfb-run --auto-servernum npm run test
env:
CI: true

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run prerelease
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
45 changes: 0 additions & 45 deletions .travis.yml

This file was deleted.

7 changes: 4 additions & 3 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,15 @@ module.exports = function(config) {
singleRun: false,
concurrency: 1, // because we use server-side
customLaunchers: {
Chrome_travis_ci: {
Chrome_ci: {
base: 'Chrome',
flags: ['--no-sandbox'],
},
},
});

if (process.env.TRAVIS) {
config.browsers = ['Chrome_travis_ci'];
if (process.env.GITHUB_ACTIONS) {
config.browsers = ['Chrome_ci'];
config.singleRun = true;
}
};
Loading

0 comments on commit 7d58b3c

Please sign in to comment.