Merge pull request #22 from PeculiarVentures/ci

github actions
This commit is contained in:
Miroshin Stepan 2020-11-25 10:37:25 +00:00 committed by GitHub
commit 1d59807416
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 482 additions and 594 deletions

View File

@ -1,29 +0,0 @@
version: 2
jobs:
build:
working_directory: ~/mern-starter # directory where steps will run
docker: # run the steps with Docker
- image: circleci/node:10.15.0
steps:
- checkout
- run:
name: update-npm
command: 'sudo npm install -g npm@latest'
- restore_cache: # special step to restore the dependency cache
key: dependency-cache-{{ checksum "package.json" }}
- run:
name: install-deps
command: npm install
- save_cache: # special step to save the dependency cache
key: dependency-cache-{{ checksum "package.json" }}
paths:
- ./node_modules
- run: # lint
name: lint
command: npm run lint
- run: # run tests with code coverage
name: test-code-coverage
command: npm run coverage
- run: # run coveralls report
name: test-report-coveralls
command: npm run coveralls

45
.github/workflows/test.yml vendored Normal file
View File

@ -0,0 +1,45 @@
name: test
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 14.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 }}

View File

@ -1,10 +0,0 @@
.circleci
.nyc_output
.vscode
coverage
node_modules
src
test
rollup.config.js
tsconfig.json
.eslintrc.json

View File

@ -1,7 +1,7 @@
# @peculiar/webcrypto # @peculiar/webcrypto
[![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://raw.githubusercontent.com/PeculiarVentures/webcrypto/master/LICENSE.md) [![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://raw.githubusercontent.com/PeculiarVentures/webcrypto/master/LICENSE.md)
[![CircleCI](https://circleci.com/gh/PeculiarVentures/webcrypto.svg?style=svg)](https://circleci.com/gh/PeculiarVentures/webcrypto) ![test](https://github.com/PeculiarVentures/webcrypto/workflows/test/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/PeculiarVentures/webcrypto/badge.svg?branch=master)](https://coveralls.io/github/PeculiarVentures/webcrypto?branch=master) [![Coverage Status](https://coveralls.io/repos/github/PeculiarVentures/webcrypto/badge.svg?branch=master)](https://coveralls.io/github/PeculiarVentures/webcrypto?branch=master)
[![npm version](https://badge.fury.io/js/%40peculiar%2Fwebcrypto.svg)](https://badge.fury.io/js/%40peculiar%2Fwebcrypto) [![npm version](https://badge.fury.io/js/%40peculiar%2Fwebcrypto.svg)](https://badge.fury.io/js/%40peculiar%2Fwebcrypto)

983
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -6,6 +6,12 @@
"type": "git", "type": "git",
"url": "https://github.com/PeculiarVentures/webcrypto.git" "url": "https://github.com/PeculiarVentures/webcrypto.git"
}, },
"files": [
"build/**/*.{ts,js}",
"index.d.ts",
"README.md",
"LICENSE.md"
],
"main": "build/webcrypto.js", "main": "build/webcrypto.js",
"module": "build/webcrypto.es.js", "module": "build/webcrypto.es.js",
"types": "index.d.ts", "types": "index.d.ts",
@ -84,6 +90,7 @@
"**/*.d.ts" "**/*.d.ts"
], ],
"reporter": [ "reporter": [
"lcov",
"text-summary", "text-summary",
"html" "html"
] ]