Skip to content

Commit 9bf8aa2

Browse files
authored
Merge pull request #27 from andstor/feat/workflow
Feat/workflow
2 parents 49ba0ae + 427b92e commit 9bf8aa2

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,22 @@ jobs:
2222
npm run build --if-present
2323
npm run coverage || npm test
2424
25-
- name: File existence
25+
- name: Coverage file existence
2626
id: check_files
2727
uses: andstor/file-existence-action@v1
2828
with:
2929
files: ./coverage/lcov.info
30+
31+
- name: "Read coverage file contents"
32+
if: steps.check_files.outputs.files_exists == 'true'
33+
id: coverage_file
34+
uses: andstor/file-reader-action@v1
35+
with:
36+
path: ./coverage/lcov.info
3037

3138
- name: Coveralls
32-
if: steps.check_files.outputs.files_exists == 'true'
39+
if: steps.check_files.outputs.files_exists == 'true' &&
40+
steps.coverage_file.outputs.contents != ''
3341
uses: coverallsapp/github-action@master
3442
with:
3543
github-token: ${{ secrets.GITHUB_TOKEN }}
36-

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"build": "webpack",
88
"watch": "webpack --watch",
99
"test": "jest --passWithNoTests",
10-
"coverage": "npm test -- --coverage --coverageReporters=text-lcov",
10+
"coverage": "npm test -- --coverage --coverageReporters=lcov",
1111
"prepare": "npm run build"
1212
},
1313
"repository": {

0 commit comments

Comments
 (0)