Refactor (#54)

* run `npm ci` instead of `npm install` for PR build

* bump version

* return Promise for test mock
This commit is contained in:
Naoki Oketani
2020-03-19 17:46:36 +09:00
committed by GitHub
parent f654b1dd0a
commit 4d8769971b
3 changed files with 6 additions and 6 deletions

View File

@@ -12,7 +12,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- run: |
npm install
npm ci
npm run all
- uses: coverallsapp/github-action@master
with:

View File

@@ -27,8 +27,8 @@ describe('run', () => {
path.join(__dirname, 'testdata/audit/success.txt')
),
status: 0,
run: (): void => {
return
run: (): Promise<void> => {
return Promise.resolve(void 0)
},
foundVulnerability: (): boolean => {
return false
@@ -60,8 +60,8 @@ describe('run', () => {
path.join(__dirname, 'testdata/audit/error.txt')
),
status: 1,
run: (): void => {
return
run: (): Promise<void> => {
return Promise.resolve(void 0)
},
foundVulnerability: (): boolean => {
return true

View File

@@ -1,6 +1,6 @@
{
"name": "npm-audit-action",
"version": "1.1.0",
"version": "1.2.0",
"private": true,
"description": "GitHub Action to run `npm audit`",
"main": "lib/main.js",