Skip to content

Commit

Permalink
feat(ci): test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tbnritzdoge committed Mar 21, 2021
1 parent 26de291 commit c8e101d
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Testing

on:
push:
pull_request:

jobs:
coverageRun:
name: Run Coverage
runs-on: ubuntu-latest
if: "!(contains(github.event.head_commit.message, '[skip test]') || contains(github.event.head_commit.message, '[skip coverage run]'))"
steps:
- name: Checkout Project
uses: actions/checkout@v2
- name: Install NodeJS v15
uses: actions/setup-node@v1
with:
node-version: '15.0.1'
- name: Restore CI Cache
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.os }}-14-${{ hashFiles('**/package-lock.json') }}
- name: Install Dependencies
run: |
npm i
- name: Run Coverage tests
run: "npm run test:coverage"
- name: Store code coverage report
uses: actions/upload-artifact@v2-preview
with:
name: coverage
path: coverage/

coverageUploadCoveralls:
name: Upload Coverage results to Coveralls
needs: coverageRun
runs-on: ubuntu-latest
if: "!(contains(github.event.head_commit.message, '[skip test]') || contains(github.event.head_commit.message, '[skip coverage upload]') || contains(github.event.head_commit.message, '[skip coverage upload coveralls]'))"
steps:
- name: Checkout Project
uses: actions/checkout@v2
- name: Download Coverage report
uses: actions/download-artifact@v2-preview
with:
name: coverage
path: coverage/
- name: Coveralls Upload
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit c8e101d

Please sign in to comment.