-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
26de291
commit c8e101d
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |