Skip to content

Commit

Permalink
ci/cd: added github actions for test and code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-shuvo committed Oct 20, 2022
1 parent a7d9bc1 commit 11f0b97
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 11 deletions.
26 changes: 18 additions & 8 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
steps:
- uses: actions/checkout@master
- uses: codecov/codecov-action@v3
with:
flags: unittests # optional
name: codecov-umbrella # optional
fail_ci_if_error: false # optional (default = false)
verbose: true # optional (default = false)
name: Codecov
on: [push, pull_request]
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm install
- name: Run tests and collect coverage
run: npm run test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Node.js CI
name: build

on:
push:
Expand All @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
node-version: [12.x, 13.x, 14.x, 15.x, 16.x, 17.x]
node-version: [12.x, 13.x, 14.x, 15.x, 16.x, 17.x, 18.x]

steps:
- uses: actions/checkout@v3
Expand Down
5 changes: 4 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<div align="center">
<h1>NodeJS Currency Converter</h1>

[![Build Status](https://github.com/paul-shuvo/nodejs-currency-converter/actions/workflows/test/badge.svg)](https://travis-ci.com/paul-shuvo/nodejs-currency-converter) [![Known Vulnerabilities](https://snyk.io/test/github/paul-shuvo/nodejs-currency-converter/badge.svg?targetFile=package.json)](https://snyk.io/test/github/paul-shuvo/nodejs-currency-converter?targetFile=package.json) ![supported node versions](https://img.shields.io/badge/node%20v-12.x%20%7C%2013.x%20%7C%2014.x%20%7C%2015.x%20%7C%2016.x%20%7C%2017.x-blue) [![codecov](https://codecov.io/gh/paul-shuvo/nodejs-currency-converter/branch/master/graph/badge.svg)](https://codecov.io/gh/paul-shuvo/nodejs-currency-converter)
![test](https://github.com/paul-shuvo/nodejs-currency-converter/actions/workflows/test.yml/badge.svg) [![Known Vulnerabilities](https://snyk.io/test/github/paul-shuvo/nodejs-currency-converter/badge.svg?targetFile=package.json)](https://snyk.io/test/github/paul-shuvo/nodejs-currency-converter?targetFile=package.json) ![supported node versions](https://img.shields.io/badge/node%20v-12.x%20%7C%2013.x%20%7C%2014.x%20%7C%2015.x%20%7C%2016.x%20%7C%2017.x-blue) [![codecov](https://codecov.io/gh/paul-shuvo/nodejs-currency-converter/branch/master/graph/badge.svg)](https://codecov.io/gh/paul-shuvo/nodejs-currency-converter)
![license: MIT](https://img.shields.io/npm/l/vue.svg) [![Maintainability](https://api.codeclimate.com/v1/badges/b512e403dfc172ee3b0d/maintainability)](https://codeclimate.com/github/paul-shuvo/nodejs-currency-converter/maintainability) [![npm version](https://badge.fury.io/js/currency-converter-lt.svg)](https://badge.fury.io/js/currency-converter-lt) ![npm](https://img.shields.io/npm/dm/currency-converter-lt)
<p>A minimal currency converter library for NodeJS that works out of the box.</p>
</div>


<!-- ![test](https://github.com/paul-shuvo/nodejs-currency-converter/actions/workflows/codecov.yml/badge.svg) -->

__Announcement__ : For crypto currency conversion, check my other package [Nodejs Crypto Converter](https://github.com/paul-shuvo/nodejs-crypto-converter).

## Getting started
Expand Down

0 comments on commit 11f0b97

Please sign in to comment.