Skip to content

Commit

Permalink
feat(chore): add coverage reports (#9)
Browse files Browse the repository at this point in the history
Create coverage reports and add report as PR comment
  • Loading branch information
marcolink authored May 16, 2020
1 parent 4710830 commit 1f90fc8
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,15 @@ jobs:
with:
node-version: '10.x'
- run: yarn
name: Install dependencies
- run: yarn test
name: Run tests
- run: yarn run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

11 changes: 9 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Tests
name: Test & Coverage

on: [push]

Expand All @@ -7,9 +7,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '10.x'
- run: yarn
name: Install dependencies
- run: yarn test
name: Run tests
#- uses: romeovs/[email protected]
# name: Post code coverage report
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# lcov-file: ./coverage/lcov.info
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# TS contentful content types generator (cf-content-types-generator)
# TS contentful content types generator

> A CLI to generate Typescript definitions based on [JSON export](https://github.com/contentful/contentful-cli/tree/master/docs/space/export) generated with [contentful CLI](https://github.com/contentful/contentful-cli).
Expand All @@ -7,6 +7,7 @@
[![Downloads/week](https://img.shields.io/npm/dw/cf-content-types-generator.svg)](https://npmjs.org/package/cf-content-types-generator)
[![License](https://img.shields.io/npm/l/cf-content-types-generator.svg)](https://github.com/contentful-labs/cf-content-types-generator/blob/master/package.json)
![Tests](https://github.com/contentful-labs/cf-content-types-generator/workflows/Tests/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/contentful-labs/cf-content-types-generator/badge.svg?branch=feat/coverage-report)](https://coveralls.io/github/contentful-labs/cf-content-types-generator?branch=feat/coverage-report)

# Table of Contents
- [Installation](#installation)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"scripts": {
"posttest": "eslint . --ext .ts --config .eslintrc --fix",
"prepack": "rm -rf lib && tsc -b && oclif-dev readme",
"test": "nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"",
"test": "nyc --reporter=text --reporter=lcov --extension .ts mocha --forbid-only \"test/**/*.test.ts\"",
"test:watch": "nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\" --watch",
"build": "./node_modules/.bin/tsc",
"version": "oclif-dev readme && git add README.md",
Expand Down

0 comments on commit 1f90fc8

Please sign in to comment.