Skip to content

Commit

Permalink
ci: Use github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
microshine committed Dec 7, 2021
1 parent f206221 commit cdf15fd
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 35 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: test

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x, 16.x]

steps:
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
run: npm install

- name: Run linter
run: npm run lint

- name: Run test with coverage
run: npm run coverage

- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# webcrypto-liner
[![license](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://raw.githubusercontent.com/PeculiarVentures/webcrypto-liner/master/LICENSE)
[![npm version](https://badge.fury.io/js/webcrypto-liner.svg)](https://badge.fury.io/js/webcrypto-liner)
[![Build Status](https://travis-ci.org/PeculiarVentures/webcrypto-liner.svg?branch=master)](https://travis-ci.org/PeculiarVentures/webcrypto-liner)
![test](https://github.com/PeculiarVentures/webcrypto-liner/workflows/test/badge.svg)

[![NPM](https://nodei.co/npm/webcrypto-liner.png)](https://nodei.co/npm/webcrypto-liner/)

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@
],
"reporter": [
"text-summary",
"html"
"html",
"lcov"
]
},
"mocha": {
Expand Down

0 comments on commit cdf15fd

Please sign in to comment.