Skip to content

Commit

Permalink
chore: created github workflow and Codecov integration
Browse files Browse the repository at this point in the history
  • Loading branch information
angelxmoreno committed Jan 25, 2024
1 parent 3342f89 commit b11310f
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/node-ci-codecov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Node.js CI with Codecov

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

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

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js and Yarn
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'

- name: Install dependencies
run: yarn install

- name: Run tests and coverage
run: yarn test:coverage

upload-coverage:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
node-version: [18.x]

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js and Yarn
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# axios-date-transformer

[![codecov](https://codecov.io/gh/angelxmoreno/axios-date-transformer/graph/badge.svg?token=4FRU5EL2J2)](https://codecov.io/gh/angelxmoreno/axios-date-transformer)

An Axios transformer for seamlessly converting ISO 8601 formatted date strings with millisecond precision to JavaScript Date objects. Simplify handling of Date objects in JSON responses with this lightweight utility.

## Installation
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"build": "tsc",
"prepare": "husky install",
"test": "jest",
"test:coverage": "jest --coverage",
"lint": "eslint . --cache",
"lint:fix": "eslint . --cache --fix",
"release": "release-it"
Expand Down

0 comments on commit b11310f

Please sign in to comment.