Skip to content

Commit

Permalink
coverage: use github-actions instead of travis
Browse files Browse the repository at this point in the history
  • Loading branch information
shrpne committed Jun 3, 2022
1 parent 035dfdd commit 64b5f25
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 14 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/test-with-coverage.yml
@@ -0,0 +1,26 @@
name: Test

on:
push:
branches: [ master ]

jobs:
build:
name: Test with coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: lts/*

- run: npm ci

- name: Test with coverage
run: npm run test

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

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -2,7 +2,7 @@

[![NPM Package](https://img.shields.io/npm/v/minterjs-tx.svg?style=flat-square)](https://www.npmjs.org/package/minterjs-tx)
[![Build Status](https://img.shields.io/travis/MinterTeam/minterjs-tx.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minterjs-tx)
[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minterjs-tx/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minterjs-tx?branch=master)
[![Build Status](https://github.com/minterteam/minterjs-tx/actions/workflows/test-with-coverage.yml/badge.svg)](https://github.com/MinterTeam/minterjs-tx/actions/workflows/test-with-coverage.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minterjs-tx/blob/master/LICENSE)

## Warning
Expand Down
3 changes: 3 additions & 0 deletions jest.config.js
Expand Up @@ -8,4 +8,7 @@ module.exports = {
transformIgnorePatterns: [
'node_modules/(?!(minterjs-util|minterjs-tx)/)',
],
// collectCoverage: true,
collectCoverageFrom: ["./src/**"],
coverageReporters: ["lcov", "text"]
};
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -20,13 +20,13 @@
"prepublishOnly": "npm run lint && npm run test && npm run build",
"lint": "eslint --ext .js ./src ./test",
"lint:fix": "eslint --ext .js ./src ./test --fix",
"test": "npm run jest && npm run test:bundle-browser && npm run test:bundle-cjs",
"test": "npm run jest-coverage && npm run test:bundle-browser && npm run test:bundle-cjs",
"test:bundle-browser": "npm run build:browser && npm run jest:bundle-browser",
"test:bundle-cjs": "npm run build:cjs && npm run jest:bundle-cjs",
"jest": "jest",
"jest:bundle-browser": "jest --config jest-bundle-browser.config.js",
"jest:bundle-cjs": "jest --config jest-bundle-cjs.config.js",
"coverage": "jest --coverage",
"jest-coverage": "jest --coverage",
"precommit": "echo 'Pre-commit checks...' && npm run lint"
},
"pre-commit": [
Expand Down

0 comments on commit 64b5f25

Please sign in to comment.