Skip to content

Commit

Permalink
Merge pull request #46 from stonelasley/slasley/coveralls
Browse files Browse the repository at this point in the history
ci: send test coverage to coveralls
  • Loading branch information
stonelasley committed Dec 5, 2021
2 parents 4f74c4f + cd5b3e2 commit b36ae42
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 49 deletions.
107 changes: 58 additions & 49 deletions .github/workflows/test-release.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,58 @@
name: Lint Test and Release

on:
pull_request:
push:
branches: [ master ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install
run: yarn

- name: Lint & Test
run: yarn ci

release:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Install
run: yarn

- name: Release
run: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
name: Lint Test and Release

on:
pull_request:
push:
branches: [ master ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install
run: yarn

- name: Lint
run: yarn lint

- name: Test
run: yarn coverage

- name: Coveralls GitHub Action
uses: coverallsapp/github-action@1.1.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}


release:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Install
run: yarn

- name: Release
run: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
![npm](https://img.shields.io/npm/v/barcode-parser)
[![Coverage Status](https://coveralls.io/repos/github/stonelasley/barcode-parsing/badge.svg?branch=master)](https://coveralls.io/github/stonelasley/barcode-parsing?branch=master)
[![Lint Test and Release](https://github.com/stonelasley/barcode-parsing/actions/workflows/test-release.yml/badge.svg)](https://github.com/stonelasley/barcode-parsing/actions/workflows/test-release.yml)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
Expand Down

0 comments on commit b36ae42

Please sign in to comment.