From 1823f48695de3aeeea92e5078db44967245c88c6 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Mon, 6 Dec 2021 10:31:39 -0500 Subject: [PATCH] Move testing from Travis to GitHub Actions (#38) --- .github/workflows/build-and-test.yml | 31 ++++++++++++++++++++++++++++ .travis.yml | 5 ----- README.md | 3 ++- package.json | 1 + 4 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/build-and-test.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 0000000..35284ff --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,31 @@ +name: Build and test +on: + pull_request: + push: + branches: + - master +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + node-version: + - 12 + - 14 + + steps: + - uses: actions/checkout@v2 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + + - run: npm install + - run: npm run build + - run: npm test + + - uses: codecov/codecov-action@v1 + with: + file: ./coverage/lcov.info diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 70a1d43..0000000 --- a/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -sudo: false -node_js: - - 12 - - 14 diff --git a/README.md b/README.md index 1c1ef42..2b7f6ca 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ # GrainJS [![npm version](https://badge.fury.io/js/grainjs.svg)](https://badge.fury.io/js/grainjs) -[![Build Status](https://travis-ci.org/gristlabs/grainjs.svg?branch=master)](https://travis-ci.org/gristlabs/grainjs) +[![Build status](https://github.com/gristlabs/grainjs/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/gristlabs/grainjs/actions/workflows/build-and-test.yml) +[![codecov](https://codecov.io/gh/gristlabs/grainjs/branch/master/graph/badge.svg?token=1OIMMBLI6N)](https://codecov.io/gh/gristlabs/grainjs) GrainJS is a Javascript (and TypeScript) library for building highly performant dynamic applications. diff --git a/package.json b/package.json index 4f829b4..199b5fb 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ }, "homepage": "https://github.com/gristlabs/grainjs#readme", "nyc": { + "reporter": ["html", "text", "lcov"], "extension": [ ".ts" ],