Refactor (#54)
* run `npm ci` instead of `npm install` for PR build * bump version * return Promise for test mock
This commit is contained in:
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@@ -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:
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user