From 2512c3fcde5bd2ae18493c14ca89047eb0cb57f2 Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Mon, 21 Jun 2021 14:57:59 -0700 Subject: [PATCH] Add github action for CI (#1102) * Add github action for CI * Update bors, remove .travis.yml, relax node version --- .github/workflows/node.js.yml | 29 +++++++++++++++++++++++++++++ .nvmrc | 2 +- .travis.yml | 25 ------------------------- bors.toml | 3 ++- package.json | 3 --- 5 files changed, 32 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/node.js.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..319c55d --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,29 @@ +# 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, staging, trying ] + pull_request: + branches: [ master, staging, trying ] + +jobs: + test: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12.x, 14.x, 16.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - run: yarn install --frozen-lockfile + - run: yarn test diff --git a/.nvmrc b/.nvmrc index 933dbb1..b009dfb 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -11.10.0 +lts/* diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index eae3218..0000000 --- a/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- -language: node_js -node_js: - - "11" - -sudo: false - -cache: - yarn: true - -before_install: - - curl -o- -L https://yarnpkg.com/install.sh | bash - - export PATH=$HOME/.yarn/bin:$PATH - -install: - - yarn install - -script: - - yarn test - -branches: - only: - - master - - staging # This is where pull requests from "bors r+" are built. - - trying # This is where pull requests from "bors try" are built. diff --git a/bors.toml b/bors.toml index 81e394a..b796e2d 100644 --- a/bors.toml +++ b/bors.toml @@ -1,6 +1,7 @@ status = [ - "continuous-integration/travis-ci/push" + "test" ] +delete_merged_branches = true # Uncomment this to use a two hour timeout. # The default is one hour. #timeout_sec = 7200 diff --git a/package.json b/package.json index 7078e63..ca60136 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,6 @@ "version": "0.1.0", "description": "Companies that don't have a broken hiring process", "main": "index.js", - "engines": { - "node": "11.x" - }, "scripts": { "test": "node ./node_modules/remark-cli/cli.js README.md -f" },