From cb3c55a8d8f20cac02f9e46d88209603b55ad759 Mon Sep 17 00:00:00 2001 From: Scott Cooper Date: Fri, 15 Oct 2021 23:07:08 -0700 Subject: [PATCH] test: Setup github actions, remove travis (#429) --- .github/workflows/ci.yml | 21 ++++++++++++++++++++ .github/workflows/release.yml | 25 ++++++++++++++++++++++++ .nvmrc | 2 +- .travis.yml | 36 ----------------------------------- karma.conf.js | 4 ++-- 5 files changed, 49 insertions(+), 39 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/release.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..eb71ab47 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,21 @@ +name: CI + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + - name: setup node + uses: actions/setup-node@v2 + with: + node-version: 16 + cache: 'yarn' + - name: setup browser + uses: browser-actions/setup-chrome@latest + - name: install dependencies + run: yarn install + - name: test + run: yarn test:ci diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..eb25e937 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,25 @@ +name: Release +on: + push: + branches: + - master +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: 'lts/*' + - name: Install dependencies + run: yarn install + - name: Build + run: yarn build + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: yarn semantic-release diff --git a/.nvmrc b/.nvmrc index 8351c193..b6a7d89c 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -14 +16 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 58cb9891..00000000 --- a/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -language: node_js -node_js: - - 14 - -cache: - yarn: true - -script: - - yarn lint - - yarn test:ci - - yarn build - -after_success: - - bash <(curl -s https://codecov.io/bash) - -jobs: - include: - - stage: release - node_js: 14 - script: - - yarn build - - yarn semantic-release - - stage: deploy - node_js: 14 - script: - - yarn ghpages - deploy: - provider: pages - skip_cleanup: true - local_dir: dist - github_token: $GH_TOKEN - on: - branch: master - -notifications: - email: false diff --git a/karma.conf.js b/karma.conf.js index 8c2dac6c..2ea76ba5 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -28,8 +28,8 @@ module.exports = function (config) { browsers: ["Chrome"], customLaunchers: { ChromeCI: { - base: `${process.env["TRAVIS"] ? "ChromeHeadless" : "Chrome"}`, - flags: process.env["TRAVIS"] ? ["--no-sandbox"] : [], + base: "ChromeHeadless", + flags: ["--no-sandbox", "--disable-gpu"], }, }, singleRun: false,