Compare commits

..

1 Commits

Author SHA1 Message Date
snyk-bot
de8a18d041 fix: upgrade @actions/core from 1.10.0 to 1.10.1
Snyk has created this PR to upgrade @actions/core from 1.10.0 to 1.10.1.

See this package in npm:
https://www.npmjs.com/package/@actions/core

See this project in Snyk:
https://app.snyk.io/org/nick-invision/project/b960b937-66a3-4aae-9cb2-321f49c8750b?utm_source=github&utm_medium=referral&page=upgrade-pr
2023-10-04 00:09:25 +00:00
9 changed files with 16473 additions and 28812 deletions

View File

@@ -14,11 +14,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v2
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v1
with: with:
node-version: 20 node-version: 16
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
- name: Run Unit Tests - name: Run Unit Tests
@@ -33,11 +33,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v2
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v1
with: with:
node-version: 20 node-version: 16
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
@@ -143,11 +143,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v2
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v1
with: with:
node-version: 20 node-version: 16
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
- name: env-vars-passed-through - name: env-vars-passed-through
@@ -164,11 +164,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v2
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v1
with: with:
node-version: 20 node-version: 16
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
- name: Test 100MiB of output can be processed - name: Test 100MiB of output can be processed
@@ -195,11 +195,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v2
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v1
with: with:
node-version: 20 node-version: 16
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
- name: retry_on_exit_code (with expected error code) - name: retry_on_exit_code (with expected error code)
@@ -243,11 +243,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v2
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v1
with: with:
node-version: 20 node-version: 16
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
- name: happy-path (continue_on_error) - name: happy-path (continue_on_error)
@@ -290,11 +290,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v2
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v1
with: with:
node-version: 20 node-version: 16
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
@@ -326,11 +326,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v2
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v1
with: with:
node-version: 20 node-version: 16
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
@@ -369,11 +369,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v2
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v1
with: with:
node-version: 20 node-version: 16
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
@@ -399,11 +399,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v2
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v1
with: with:
node-version: 20 node-version: 16
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
@@ -430,11 +430,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v2
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v1
with: with:
node-version: 20 node-version: 16
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
@@ -465,11 +465,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v2
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v1
with: with:
node-version: 20 node-version: 16
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
@@ -495,11 +495,11 @@ jobs:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v2
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v1
with: with:
node-version: 20 node-version: 16
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
- name: Powershell test - name: Powershell test
@@ -571,11 +571,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v2
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v1
with: with:
node-version: 20 node-version: 16
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
- name: Release - name: Release

2
.nvmrc
View File

@@ -1 +1 @@
v20.11.0 v16.16.0

View File

@@ -79,7 +79,7 @@ The final error returned by the command
### Shell ### Shell
```yaml ```yaml
uses: nick-fields/retry@v3 uses: nick-fields/retry@v2
with: with:
timeout_minutes: 10 timeout_minutes: 10
max_attempts: 3 max_attempts: 3
@@ -90,7 +90,7 @@ with:
### Timeout in minutes ### Timeout in minutes
```yaml ```yaml
uses: nick-fields/retry@v3 uses: nick-fields/retry@v2
with: with:
timeout_minutes: 10 timeout_minutes: 10
max_attempts: 3 max_attempts: 3
@@ -100,7 +100,7 @@ with:
### Timeout in seconds ### Timeout in seconds
```yaml ```yaml
uses: nick-fields/retry@v3 uses: nick-fields/retry@v2
with: with:
timeout_seconds: 15 timeout_seconds: 15
max_attempts: 3 max_attempts: 3
@@ -110,7 +110,7 @@ with:
### Only retry after timeout ### Only retry after timeout
```yaml ```yaml
uses: nick-fields/retry@v3 uses: nick-fields/retry@v2
with: with:
timeout_seconds: 15 timeout_seconds: 15
max_attempts: 3 max_attempts: 3
@@ -121,7 +121,7 @@ with:
### Only retry after error ### Only retry after error
```yaml ```yaml
uses: nick-fields/retry@v3 uses: nick-fields/retry@v2
with: with:
timeout_seconds: 15 timeout_seconds: 15
max_attempts: 3 max_attempts: 3
@@ -132,7 +132,7 @@ with:
### Retry using continue_on_error input (in composite action) but allow failure and do something with output ### Retry using continue_on_error input (in composite action) but allow failure and do something with output
```yaml ```yaml
- uses: nick-fields/retry@v3 - uses: nick-fields/retry@v2
id: retry id: retry
with: with:
timeout_seconds: 15 timeout_seconds: 15
@@ -154,7 +154,7 @@ with:
### Retry using continue-on-error built-in command (in workflow action) but allow failure and do something with output ### Retry using continue-on-error built-in command (in workflow action) but allow failure and do something with output
```yaml ```yaml
- uses: nick-fields/retry@v3 - uses: nick-fields/retry@v2
id: retry id: retry
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idcontinue-on-error # see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idcontinue-on-error
continue-on-error: true continue-on-error: true
@@ -183,7 +183,7 @@ with:
### Run script after failure but before retry ### Run script after failure but before retry
```yaml ```yaml
uses: nick-fields/retry@v3 uses: nick-fields/retry@v2
with: with:
timeout_seconds: 15 timeout_seconds: 15
max_attempts: 3 max_attempts: 3
@@ -194,7 +194,7 @@ with:
### Run different command after first failure ### Run different command after first failure
```yaml ```yaml
uses: nick-fields/retry@v3 uses: nick-fields/retry@v2
with: with:
timeout_seconds: 15 timeout_seconds: 15
max_attempts: 3 max_attempts: 3
@@ -206,7 +206,7 @@ with:
```yaml ```yaml
name: Multi-line multi-command Test name: Multi-line multi-command Test
uses: nick-fields/retry@v3 uses: ./
with: with:
timeout_minutes: 1 timeout_minutes: 1
max_attempts: 2 max_attempts: 2
@@ -219,7 +219,7 @@ with:
```yaml ```yaml
name: Multi-line single-command Test name: Multi-line single-command Test
uses: nick-fields/retry@v3 uses: ./
with: with:
timeout_minutes: 1 timeout_minutes: 1
max_attempts: 2 max_attempts: 2

View File

@@ -50,5 +50,5 @@ outputs:
exit_error: exit_error:
description: The final error returned by the command description: The final error returned by the command
runs: runs:
using: 'node20' using: 'node16'
main: 'dist/index.js' main: 'dist/index.js'

28699
dist/index.js vendored

File diff suppressed because one or more lines are too long

16464
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -23,7 +23,7 @@
}, },
"homepage": "https://github.com/nick-invision/retry#readme", "homepage": "https://github.com/nick-invision/retry#readme",
"dependencies": { "dependencies": {
"@actions/core": "^1.10.0", "@actions/core": "^1.10.1",
"milliseconds": "^1.0.3", "milliseconds": "^1.0.3",
"tree-kill": "^1.2.2" "tree-kill": "^1.2.2"
}, },
@@ -37,7 +37,7 @@
"@types/node": "^16.11.7", "@types/node": "^16.11.7",
"@typescript-eslint/eslint-plugin": "^5.32.0", "@typescript-eslint/eslint-plugin": "^5.32.0",
"@typescript-eslint/parser": "^5.32.0", "@typescript-eslint/parser": "^5.32.0",
"@vercel/ncc": "^0.38.1", "@zeit/ncc": "^0.20.5",
"dotenv": "8.2.0", "dotenv": "8.2.0",
"eslint": "^8.21.0", "eslint": "^8.21.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",

View File

@@ -130,7 +130,6 @@ async function runAction(inputs: Inputs) {
await validateInputs(inputs); await validateInputs(inputs);
for (let attempt = 1; attempt <= inputs.max_attempts; attempt++) { for (let attempt = 1; attempt <= inputs.max_attempts; attempt++) {
info(`::group::Attempt ${attempt}`);
try { try {
// just keep overwriting attempts output // just keep overwriting attempts output
setOutput(OUTPUT_TOTAL_ATTEMPTS_KEY, attempt); setOutput(OUTPUT_TOTAL_ATTEMPTS_KEY, attempt);
@@ -157,8 +156,6 @@ async function runAction(inputs: Inputs) {
info(`Attempt ${attempt} failed. Reason: ${error.message}`); info(`Attempt ${attempt} failed. Reason: ${error.message}`);
} }
} }
} finally {
info(`::endgroup::`);
} }
} }
} }

View File

@@ -3,11 +3,6 @@ import { getHeapStatistics } from 'v8';
import { wait } from './util'; import { wait } from './util';
// otherwise, TypeError: Cannot assign to read only property 'performance' of object '[object global]'
Object.defineProperty(global, 'performance', {
writable: true,
});
// mocks the setTimeout function, see https://jestjs.io/docs/timer-mocks // mocks the setTimeout function, see https://jestjs.io/docs/timer-mocks
jest.useFakeTimers(); jest.useFakeTimers();
jest.spyOn(global, 'setTimeout'); jest.spyOn(global, 'setTimeout');