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: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- run: | - run: |
npm install npm ci
npm run all npm run all
- uses: coverallsapp/github-action@master - uses: coverallsapp/github-action@master
with: with:

View File

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

View File

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