Skip to content

Commit

Permalink
add jest badge
Browse files Browse the repository at this point in the history
  • Loading branch information
inkognitro committed Mar 18, 2024
1 parent 151e618 commit 9c6c76b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 27 deletions.
32 changes: 10 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,16 @@
name: CI Pipeline

on:
push:
branches:
- '*'
pull_request:
branches:
- '*'

on: [push]
jobs:
test:
name: Test
bump:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Check out repository code
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '20.x'
- name: Test
run: npm run test-ci

- name: Install node modules
run: npm install

- name: Run tests
run: npm run test
- name: Generating coverage badges
uses: jpb06/jest-badges-action@latest
with:
branches: main
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
coverageReporters: ['json-summary'],
roots: ['<rootDir>/src'],
testMatch: [
'**/__tests__/**/*.+(ts|js)',
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@
"description": "A tool to convert OpenApi specifications into callable endpoint functions in TS.",
"main": "index.js",
"scripts": {
"start": "npx tspc -w",
"prodTest": "node build/src/generate.js",
"test": "jest",
"tspc": "tspc",
"lint": "gts lint",
"clean": "gts clean",
"compile": "tsc",
"fix": "gts fix",
"posttest": "npm.cmd run lint",
"prepare": "npm.cmd run compile",
"pretest": "npm.cmd run compile",
"posttest": "npm.cmd run lint"
"prodTest": "node build/src/generate.js",
"start": "npx tspc -w",
"test": "jest",
"test-ci": "jest --ci --coverage",
"tspc": "tspc"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 9c6c76b

Please sign in to comment.