Compare commits

..

1 Commits

Author SHA1 Message Date
dependabot[bot]
407e071408 build(deps): bump json5 from 2.2.1 to 2.2.3
Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.1...v2.2.3)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-09 02:31:57 +00:00
5 changed files with 40 additions and 35 deletions

View File

@@ -1,16 +1,12 @@
name: CI/CD
on:
# only on PRs into and merge to default branch
pull_request:
branches:
- master
push:
branches:
- master
jobs:
# runs on branch pushes only
ci_unit:
name: Run Unit Tests
if: startsWith(github.ref, 'refs/heads')
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -30,6 +26,7 @@ jobs:
ci_integration:
name: Run Integration Tests
if: startsWith(github.ref, 'refs/heads')
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -140,6 +137,7 @@ jobs:
ci_integration_envvar:
name: Run Integration Env Var Tests
if: startsWith(github.ref, 'refs/heads')
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -161,6 +159,7 @@ jobs:
ci_integration_large_output:
name: Run Integration Large Output Tests
if: startsWith(github.ref, 'refs/heads')
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -192,6 +191,7 @@ jobs:
ci_integration_retry_on_exit_code:
name: Run Integration retry_on_exit_code Tests
if: startsWith(github.ref, 'refs/heads')
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -240,6 +240,7 @@ jobs:
ci_integration_continue_on_error:
name: Run Integration continue_on_error Tests
if: startsWith(github.ref, 'refs/heads')
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -287,6 +288,7 @@ jobs:
ci_integration_retry_wait_seconds:
name: Run Integration Tests (retry_wait_seconds)
if: startsWith(github.ref, 'refs/heads')
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -323,6 +325,7 @@ jobs:
ci_integration_on_retry_cmd:
name: Run Integration Tests (on_retry_command)
if: startsWith(github.ref, 'refs/heads')
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -366,6 +369,7 @@ jobs:
# timeout tests take longer to run so run in parallel
ci_integration_timeout_seconds:
name: Run Integration Timeout Tests (seconds)
if: startsWith(github.ref, 'refs/heads')
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -396,6 +400,7 @@ jobs:
ci_integration_timeout_retry_on_timeout:
name: Run Integration Timeout Tests (retry_on timeout)
if: startsWith(github.ref, 'refs/heads')
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -427,6 +432,7 @@ jobs:
ci_integration_timeout_retry_on_error:
name: Run Integration Timeout Tests (retry_on error)
if: startsWith(github.ref, 'refs/heads')
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -462,6 +468,7 @@ jobs:
ci_integration_timeout_minutes:
name: Run Integration Timeout Tests (minutes)
if: startsWith(github.ref, 'refs/heads')
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -492,6 +499,7 @@ jobs:
ci_windows:
name: Run Windows Tests
if: startsWith(github.ref, 'refs/heads')
runs-on: windows-latest
steps:
- name: Checkout
@@ -563,7 +571,7 @@ jobs:
steps:
- run: echo "If this is hit, all tests successfully passed"
# runs on merge to default only
# runs on push to master only
cd:
name: Publish Action
needs: [ci_all_tests_passed]
@@ -580,7 +588,7 @@ jobs:
run: npm ci
- name: Release
id: semantic
uses: cycjimmy/semantic-release-action@v4
uses: cycjimmy/semantic-release-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Tag

11
dist/index.js vendored
View File

@@ -948,8 +948,7 @@ function getExecutable(inputs) {
return OS === 'win32' ? 'powershell' : 'bash';
}
var executable;
var shellName = inputs.shell.split(' ')[0];
switch (shellName) {
switch (inputs.shell) {
case 'bash':
case 'python':
case 'pwsh': {
@@ -958,7 +957,7 @@ function getExecutable(inputs) {
}
case 'sh': {
if (OS === 'win32') {
throw new Error("Shell ".concat(shellName, " not allowed on OS ").concat(OS));
throw new Error("Shell ".concat(inputs.shell, " not allowed on OS ").concat(OS));
}
executable = inputs.shell;
break;
@@ -966,13 +965,13 @@ function getExecutable(inputs) {
case 'cmd':
case 'powershell': {
if (OS !== 'win32') {
throw new Error("Shell ".concat(shellName, " not allowed on OS ").concat(OS));
throw new Error("Shell ".concat(inputs.shell, " not allowed on OS ").concat(OS));
}
executable = shellName + '.exe' + inputs.shell.replace(shellName, '');
executable = inputs.shell + '.exe';
break;
}
default: {
throw new Error("Shell ".concat(shellName, " not supported. See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell for supported shells"));
throw new Error("Shell ".concat(inputs.shell, " not supported. See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell for supported shells"));
}
}
return executable;

26
package-lock.json generated
View File

@@ -9,7 +9,7 @@
"version": "0.0.0-managed-by-semantic-release",
"license": "ISC",
"dependencies": {
"@actions/core": "^1.10.1",
"@actions/core": "^1.10.0",
"milliseconds": "^1.0.3",
"tree-kill": "^1.2.2"
},
@@ -39,9 +39,9 @@
}
},
"node_modules/@actions/core": {
"version": "1.10.1",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.1.tgz",
"integrity": "sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==",
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz",
"integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==",
"dependencies": {
"@actions/http-client": "^2.0.1",
"uuid": "^8.3.2"
@@ -7479,9 +7479,9 @@
"dev": true
},
"node_modules/json5": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
"dev": true,
"bin": {
"json5": "lib/cli.js"
@@ -13090,9 +13090,9 @@
},
"dependencies": {
"@actions/core": {
"version": "1.10.1",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.1.tgz",
"integrity": "sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==",
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz",
"integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==",
"requires": {
"@actions/http-client": "^2.0.1",
"uuid": "^8.3.2"
@@ -18643,9 +18643,9 @@
"dev": true
},
"json5": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
"dev": true
},
"jsonfile": {

View File

@@ -23,7 +23,7 @@
},
"homepage": "https://github.com/nick-invision/retry#readme",
"dependencies": {
"@actions/core": "^1.10.1",
"@actions/core": "^1.10.0",
"milliseconds": "^1.0.3",
"tree-kill": "^1.2.2"
},

View File

@@ -20,9 +20,7 @@ function getExecutable(inputs: Inputs): string {
}
let executable: string;
const shellName = inputs.shell.split(' ')[0];
switch (shellName) {
switch (inputs.shell) {
case 'bash':
case 'python':
case 'pwsh': {
@@ -31,7 +29,7 @@ function getExecutable(inputs: Inputs): string {
}
case 'sh': {
if (OS === 'win32') {
throw new Error(`Shell ${shellName} not allowed on OS ${OS}`);
throw new Error(`Shell ${inputs.shell} not allowed on OS ${OS}`);
}
executable = inputs.shell;
break;
@@ -39,14 +37,14 @@ function getExecutable(inputs: Inputs): string {
case 'cmd':
case 'powershell': {
if (OS !== 'win32') {
throw new Error(`Shell ${shellName} not allowed on OS ${OS}`);
throw new Error(`Shell ${inputs.shell} not allowed on OS ${OS}`);
}
executable = shellName + '.exe' + inputs.shell.replace(shellName, '');
executable = inputs.shell + '.exe';
break;
}
default: {
throw new Error(
`Shell ${shellName} not supported. See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell for supported shells`
`Shell ${inputs.shell} not supported. See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell for supported shells`
);
}
}