34 Commits

Author SHA1 Message Date
dependabot[bot]
66668f767a Bump @types/node from 22.15.29 to 22.15.30 in the actions group
Bumps the actions group with 1 update: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node).


Updates `@types/node` from 22.15.29 to 22.15.30
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 22.15.30
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-09 11:25:37 +00:00
dependabot[bot]
fa3df0f1e2 Bump @types/node from 22.15.21 to 22.15.29 in the actions group (#161) 2025-06-03 10:25:59 -04:00
dependabot[bot]
4d5f3eda74 Bump @types/node from 22.15.19 to 22.15.21 in the actions group (#160) 2025-05-27 12:04:22 -07:00
dependabot[bot]
393d232f65 Bump github/codeql-action in /.github/workflows in the actions group (#158) 2025-05-20 15:13:31 -04:00
dependabot[bot]
a0d66424c8 Bump the actions group with 2 updates (#159) 2025-05-20 15:13:20 -04:00
dependabot[bot]
a76651a0e0 Bump @types/node from 22.15.3 to 22.15.17 in the actions group (#157) 2025-05-13 15:08:34 -04:00
dependabot[bot]
cf5fdd749b Bump github/codeql-action in /.github/workflows in the actions group (#156) 2025-05-06 15:05:05 -04:00
dependabot[bot]
de1d5ec5de Bump @types/node from 22.14.1 to 22.15.3 in the actions group (#154) 2025-04-29 15:10:58 -04:00
dependabot[bot]
e6e81bbc41 Bump the actions group in /.github/workflows with 2 updates (#155) 2025-04-29 15:10:37 -04:00
dependabot[bot]
30d747582d Bump the actions group with 2 updates (#152) 2025-04-15 15:07:41 -04:00
dependabot[bot]
f4440b5470 Bump the actions group in /.github/workflows with 2 updates (#153) 2025-04-15 15:07:21 -04:00
dependabot[bot]
0fd96d6276 Bump the actions group with 3 updates (#150) 2025-04-08 15:06:25 -04:00
dependabot[bot]
4ef821e7ca Bump github/codeql-action in /.github/workflows in the actions group (#151) 2025-04-08 15:05:58 -04:00
dependabot[bot]
95e0936d6e Bump @types/node from 22.13.12 to 22.13.14 in the actions group (#148) 2025-04-01 15:07:10 -04:00
dependabot[bot]
87e53e3f71 Bump the actions group in /.github/workflows with 2 updates (#149)
Bumps the actions group in /.github/workflows with 2 updates: [github/codeql-action](https://github.com/github/codeql-action) and [actions/setup-python](https://github.com/actions/setup-python).


Updates `github/codeql-action` from 3.28.12 to 3.28.13
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](5f8171a638...1b549b9259)

Updates `actions/setup-python` from 5.4.0 to 5.5.0
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](42375524e2...8d9ed9ac5c)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-01 15:06:48 -04:00
dependabot[bot]
13bef3ca00 Bump the actions group across 1 directory with 2 updates (#147)
Bumps the actions group with 2 updates in the /.github/workflows directory: [github/codeql-action](https://github.com/github/codeql-action) and [actions/setup-node](https://github.com/actions/setup-node).


Updates `github/codeql-action` from 3.28.11 to 3.28.12
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](6bb031afdd...5f8171a638)

Updates `actions/setup-node` from 4.2.0 to 4.3.0
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](1d0ff469b7...cdca7365b2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-26 08:11:07 +13:00
dependabot[bot]
023f859e5d Bump the actions group with 2 updates (#146) 2025-03-26 08:10:51 +13:00
dependabot[bot]
6bd1f0daf1 Bump the actions group across 1 directory with 4 updates (#143)
Bumps the actions group with 4 updates in the / directory: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [prettier](https://github.com/prettier/prettier), [ts-jest](https://github.com/kulshekhar/ts-jest) and [typescript](https://github.com/microsoft/TypeScript).


Updates `@types/node` from 22.13.1 to 22.13.10
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `prettier` from 3.5.0 to 3.5.3
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.5.0...3.5.3)

Updates `ts-jest` from 29.2.5 to 29.2.6
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v29.2.5...v29.2.6)

Updates `typescript` from 5.7.3 to 5.8.2
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.7.3...v5.8.2)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-13 14:20:16 -04:00
dependabot[bot]
574933e749 Bump github/codeql-action (#144)
Bumps the actions group with 1 update in the /.github/workflows directory: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 3.28.9 to 3.28.11
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](9e8d0789d4...6bb031afdd)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-13 14:19:24 -04:00
dependabot[bot]
46ce001b45 Bump braces, jest and ts-jest (#103) 2025-02-19 20:50:54 -08:00
dependabot[bot]
f7a3237edf Bump the actions group across 1 directory with 2 updates (#135)
Bumps the actions group with 2 updates in the / directory: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [prettier](https://github.com/prettier/prettier).


Updates `@types/node` from 22.10.10 to 22.13.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `prettier` from 3.4.2 to 3.5.0
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.4.2...3.5.0)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-12 12:11:31 -08:00
dependabot[bot]
9c31f8cc61 Bump github/codeql-action in /.github/workflows in the actions group (#136)
Bumps the actions group in /.github/workflows with 1 update: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 3.28.6 to 3.28.9
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](17a820bf2e...9e8d0789d4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-12 12:11:05 -08:00
Vidya Reddy
eaac930c67 Security: remove updated action and fix prettier (#134) 2025-02-07 12:00:17 -08:00
Vidya Reddy
8e9b27e666 Adding SHA for security and stability (#133) 2025-02-05 09:21:23 -08:00
Vidya Reddy
fd493af03c Add code quality analysis (#132) 2025-02-05 09:12:57 +13:00
Jaiveer Katariya
304c023ca5 Actions Bump (#130)
* Bump the actions group across 1 directory with 3 updates

Bumps the actions group with 3 updates in the / directory: [@actions/tool-cache](https://github.com/actions/toolkit/tree/HEAD/packages/tool-cache), [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [typescript](https://github.com/microsoft/TypeScript).


Updates `@actions/tool-cache` from 2.0.1 to 2.0.2
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/tool-cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/tool-cache)

Updates `@types/node` from 22.10.2 to 22.10.10
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `typescript` from 5.7.2 to 5.7.3
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.7.2...v5.7.3)

---
updated-dependencies:
- dependency-name: "@actions/tool-cache"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>

* new method

* initial

* moved execution to index to free up tests

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-31 10:43:21 -05:00
dependabot[bot]
2d66d6bef6 Bump the actions group across 1 directory with 4 updates (#125)
Bumps the actions group with 4 updates in the / directory: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [@vercel/ncc](https://github.com/vercel/ncc), [prettier](https://github.com/prettier/prettier) and [typescript](https://github.com/microsoft/TypeScript).


Updates `@types/node` from 22.8.7 to 22.10.2
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@vercel/ncc` from 0.38.2 to 0.38.3
- [Release notes](https://github.com/vercel/ncc/releases)
- [Commits](https://github.com/vercel/ncc/compare/0.38.2...0.38.3)

Updates `prettier` from 3.3.3 to 3.4.2
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.3.3...3.4.2)

Updates `typescript` from 5.6.3 to 5.7.2
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.6.3...v5.7.2)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: "@vercel/ncc"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-18 15:24:40 -05:00
dependabot[bot]
3b0a9a4ae3 Bump @types/node in the actions group across 1 directory (#119)
Bumps the actions group with 1 update in the / directory: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node).


Updates `@types/node` from 22.7.9 to 22.8.7
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-06 15:09:30 -05:00
dependabot[bot]
66e812b74c Bump the actions group across 1 directory with 5 updates (#117)
Bumps the actions group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) | `1.10.1` | `1.11.1` |
| [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) | `29.5.12` | `29.5.14` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `22.5.4` | `22.7.9` |
| [@vercel/ncc](https://github.com/vercel/ncc) | `0.38.1` | `0.38.2` |
| [typescript](https://github.com/microsoft/TypeScript) | `5.5.4` | `5.6.3` |



Updates `@actions/core` from 1.10.1 to 1.11.1
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

Updates `@types/jest` from 29.5.12 to 29.5.14
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Updates `@types/node` from 22.5.4 to 22.7.9
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@vercel/ncc` from 0.38.1 to 0.38.2
- [Release notes](https://github.com/vercel/ncc/releases)
- [Commits](https://github.com/vercel/ncc/compare/0.38.1...0.38.2)

Updates `typescript` from 5.5.4 to 5.6.3
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.5.4...v5.6.3)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: "@types/jest"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: "@vercel/ncc"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-23 12:30:23 -07:00
Jaiveer Katariya
fc19d5430f fix (#116) 2024-10-23 12:24:24 -07:00
dependabot[bot]
5f6d890454 Bump @types/node from 22.5.2 to 22.5.4 in the actions group (#110)
Bumps the actions group with 1 update: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node).


Updates `@types/node` from 22.5.2 to 22.5.4
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-11 15:33:10 -04:00
dependabot[bot]
27d304ebf8 Bump the actions group in /.github/workflows with 4 updates (#108)
Bumps the actions group in /.github/workflows with 4 updates: [actions/stale](https://github.com/actions/stale), [actions/checkout](https://github.com/actions/checkout), [actions/setup-python](https://github.com/actions/setup-python) and [actionsx/prettier](https://github.com/actionsx/prettier).


Updates `actions/stale` from 3 to 9
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v3...v9)

Updates `actions/checkout` from 1 to 4
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v1...v4)

Updates `actions/setup-python` from 2 to 5
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2...v5)

Updates `actionsx/prettier` from 2 to 3
- [Release notes](https://github.com/actionsx/prettier/releases)
- [Commits](https://github.com/actionsx/prettier/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actionsx/prettier
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-11 15:32:13 -04:00
dependabot[bot]
b5a36385a8 Bump the actions group with 9 updates (#109)
Bumps the actions group with 9 updates:

| Package | From | To |
| --- | --- | --- |
| [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) | `1.10.0` | `1.10.1` |
| [@actions/tool-cache](https://github.com/actions/toolkit/tree/HEAD/packages/tool-cache) | `1.7.2` | `2.0.1` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `12.20.55` | `22.5.2` |
| [@vercel/ncc](https://github.com/vercel/ncc) | `0.34.0` | `0.38.1` |
| [jest](https://github.com/jestjs/jest/tree/HEAD/packages/jest) | `26.6.3` | `29.7.0` |
| [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) | `26.0.24` | `29.5.12` |
| [prettier](https://github.com/prettier/prettier) | `2.7.1` | `3.3.3` |
| [ts-jest](https://github.com/kulshekhar/ts-jest) | `26.5.6` | `29.2.5` |
| [typescript](https://github.com/Microsoft/TypeScript) | `3.9.2` | `5.5.4` |


Updates `@actions/core` from 1.10.0 to 1.10.1
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

Updates `@actions/tool-cache` from 1.7.2 to 2.0.1
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/tool-cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/@actions/artifact@2.0.1/packages/tool-cache)

Updates `@types/node` from 12.20.55 to 22.5.2
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@vercel/ncc` from 0.34.0 to 0.38.1
- [Release notes](https://github.com/vercel/ncc/releases)
- [Commits](https://github.com/vercel/ncc/compare/0.34.0...0.38.1)

Updates `jest` from 26.6.3 to 29.7.0
- [Release notes](https://github.com/jestjs/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jestjs/jest/commits/v29.7.0/packages/jest)

Updates `@types/jest` from 26.0.24 to 29.5.12
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Updates `prettier` from 2.7.1 to 3.3.3
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.7.1...3.3.3)

Updates `ts-jest` from 26.5.6 to 29.2.5
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v26.5.6...v29.2.5)

Updates `typescript` from 3.9.2 to 5.5.4
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.9.2...v5.5.4)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: "@actions/tool-cache"
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: "@vercel/ncc"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: "@types/jest"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-03 16:17:04 -04:00
David Gamero
0b4bd0b42d Create dependabot.yml (#107)
* Create dependabot.yml

* format

* directory for npm
2024-09-03 16:01:27 -04:00
13 changed files with 2706 additions and 7091 deletions

91
.github/workflows/codeql.yml vendored Normal file
View File

@@ -0,0 +1,91 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: 'CodeQL Advanced'
on:
push:
branches: ['main']
pull_request:
branches: ['main']
schedule:
- cron: '15 9 * * 0'
jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
# required for all workflows
security-events: write
# required to fetch internal or private CodeQL packs
packages: read
# only required for workflows in private repositories
actions: read
contents: read
strategy:
fail-fast: false
matrix:
include:
- language: javascript-typescript
build-mode: none
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
with:
category: '/language:${{matrix.language}}'

View File

@@ -8,7 +8,7 @@ jobs:
label-issues: label-issues:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v3 - uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
name: Setting issue as idle name: Setting issue as idle
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
@@ -19,7 +19,7 @@ jobs:
operations-per-run: 100 operations-per-run: 100
exempt-issue-labels: 'backlog' exempt-issue-labels: 'backlog'
- uses: actions/stale@v3 - uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
name: Setting PR as idle name: Setting PR as idle
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -17,7 +17,7 @@ jobs:
KUBECONFIG: /home/runner/.kube/config KUBECONFIG: /home/runner/.kube/config
PR_BASE_REF: ${{ github.event.pull_request.base.ref }} PR_BASE_REF: ${{ github.event.pull_request.base.ref }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
name: Checkout from PR branch name: Checkout from PR branch
- id: action-npm-build - id: action-npm-build
@@ -29,7 +29,7 @@ jobs:
npm run build npm run build
fi fi
- uses: actions/setup-python@v2 - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
name: Install Python name: Install Python
with: with:
python-version: '3.x' python-version: '3.x'
@@ -37,13 +37,18 @@ jobs:
- name: Install requests library - name: Install requests library
run: pip install requests run: pip install requests
- name: Setup kubectl latest
uses: ./
with:
version: 'latest'
- name: Validate kubectl setup - name: Validate kubectl setup
run: python test/validate-kubectl.py latest run: python test/validate-kubectl.py latest
- name: Setup kubectl - name: Setup kubectl old version
uses: ./ uses: ./
with: with:
version: 'v1.15.1' version: 'v1.15.1'
- name: Validate kubectl setup - name: Validate kubectl setup old version
run: python test/validate-kubectl.py 'v1.15.1' run: python test/validate-kubectl.py 'v1.15.1'

View File

@@ -10,9 +10,16 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v2 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Enforce Prettier - name: Setup Node.js
uses: actionsx/prettier@v2 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with: with:
args: --check . node-version: 'lts/*'
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Run Prettier Check
run: npx prettier --check .

View File

@@ -13,7 +13,7 @@ jobs:
build: # make sure build/ci works properly build: # make sure build/ci works properly
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Build and run L0 tests. - name: Build and run L0 tests.
run: | run: |

9543
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,7 @@
"private": true, "private": true,
"main": "lib/index.js", "main": "lib/index.js",
"scripts": { "scripts": {
"build": "npm i ncc && npx ncc build src/run.ts -o lib", "build": "npm i ncc && npx ncc build src/index.ts -o lib",
"test": "jest", "test": "jest",
"test-coverage": "jest --coverage", "test-coverage": "jest --coverage",
"format": "prettier --write .", "format": "prettier --write .",
@@ -18,17 +18,17 @@
"author": "GitHub", "author": "GitHub",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/core": "^1.10.0", "@actions/core": "^1.11.1",
"@actions/exec": "^1.0.0", "@actions/exec": "^1.0.0",
"@actions/tool-cache": "^1.0.0" "@actions/tool-cache": "^2.0.2"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^26.0.0", "@types/jest": "^29.5.14",
"@types/node": "^12.0.4", "@types/node": "^22.15.30",
"@vercel/ncc": "^0.34.0", "@vercel/ncc": "^0.38.3",
"jest": "^26.0.1", "jest": "^29.7.0",
"prettier": "2.7.1", "prettier": "3.5.3",
"ts-jest": "^26.0.0", "ts-jest": "^29.3.4",
"typescript": "3.9.2" "typescript": "5.8.3"
} }
} }

4
src/index.ts Normal file
View File

@@ -0,0 +1,4 @@
import {run} from './run'
import * as core from '@actions/core'
run().catch(core.setFailed)

View File

@@ -14,18 +14,14 @@ import * as util from 'util'
describe('Testing all functions in run file.', () => { describe('Testing all functions in run file.', () => {
test('getExecutableExtension() - return .exe when os is Windows', () => { test('getExecutableExtension() - return .exe when os is Windows', () => {
jest.spyOn(os, 'type').mockReturnValue('Windows_NT') jest.spyOn(os, 'type').mockReturnValue('Windows_NT')
expect(getExecutableExtension()).toBe('.exe') expect(getExecutableExtension()).toBe('.exe')
expect(os.type).toBeCalled() expect(os.type).toBeCalled()
}) })
test('getExecutableExtension() - return empty string for non-windows OS', () => { test('getExecutableExtension() - return empty string for non-windows OS', () => {
jest.spyOn(os, 'type').mockReturnValue('Darwin') jest.spyOn(os, 'type').mockReturnValue('Darwin')
expect(getExecutableExtension()).toBe('') expect(getExecutableExtension()).toBe('')
expect(os.type).toBeCalled() expect(os.type).toBeCalled()
}) })
test.each([ test.each([
['arm', 'arm'], ['arm', 'arm'],
['arm64', 'arm64'], ['arm64', 'arm64'],
@@ -34,12 +30,10 @@ describe('Testing all functions in run file.', () => {
'getKubectlArch() - return on %s os arch %s kubectl arch', 'getKubectlArch() - return on %s os arch %s kubectl arch',
(osArch, kubectlArch) => { (osArch, kubectlArch) => {
jest.spyOn(os, 'arch').mockReturnValue(osArch) jest.spyOn(os, 'arch').mockReturnValue(osArch)
expect(getKubectlArch()).toBe(kubectlArch) expect(getKubectlArch()).toBe(kubectlArch)
expect(os.arch).toBeCalled() expect(os.arch).toBeCalled()
} }
) )
test.each([['arm'], ['arm64'], ['amd64']])( test.each([['arm'], ['arm64'], ['amd64']])(
'getkubectlDownloadURL() - return the URL to download %s kubectl for Linux', 'getkubectlDownloadURL() - return the URL to download %s kubectl for Linux',
(arch) => { (arch) => {
@@ -48,12 +42,10 @@ describe('Testing all functions in run file.', () => {
'https://dl.k8s.io/release/v1.15.0/bin/linux/%s/kubectl', 'https://dl.k8s.io/release/v1.15.0/bin/linux/%s/kubectl',
arch arch
) )
expect(getkubectlDownloadURL('v1.15.0', arch)).toBe(kubectlLinuxUrl) expect(getkubectlDownloadURL('v1.15.0', arch)).toBe(kubectlLinuxUrl)
expect(os.type).toBeCalled() expect(os.type).toBeCalled()
} }
) )
test.each([['arm'], ['arm64'], ['amd64']])( test.each([['arm'], ['arm64'], ['amd64']])(
'getkubectlDownloadURL() - return the URL to download %s kubectl for Darwin', 'getkubectlDownloadURL() - return the URL to download %s kubectl for Darwin',
(arch) => { (arch) => {
@@ -62,17 +54,14 @@ describe('Testing all functions in run file.', () => {
'https://dl.k8s.io/release/v1.15.0/bin/darwin/%s/kubectl', 'https://dl.k8s.io/release/v1.15.0/bin/darwin/%s/kubectl',
arch arch
) )
expect(getkubectlDownloadURL('v1.15.0', arch)).toBe(kubectlDarwinUrl) expect(getkubectlDownloadURL('v1.15.0', arch)).toBe(kubectlDarwinUrl)
expect(os.type).toBeCalled() expect(os.type).toBeCalled()
} }
) )
test.each([['arm'], ['arm64'], ['amd64']])( test.each([['arm'], ['arm64'], ['amd64']])(
'getkubectlDownloadURL() - return the URL to download %s kubectl for Windows', 'getkubectlDownloadURL() - return the URL to download %s kubectl for Windows',
(arch) => { (arch) => {
jest.spyOn(os, 'type').mockReturnValue('Windows_NT') jest.spyOn(os, 'type').mockReturnValue('Windows_NT')
const kubectlWindowsUrl = util.format( const kubectlWindowsUrl = util.format(
'https://dl.k8s.io/release/v1.15.0/bin/windows/%s/kubectl.exe', 'https://dl.k8s.io/release/v1.15.0/bin/windows/%s/kubectl.exe',
arch arch
@@ -81,38 +70,31 @@ describe('Testing all functions in run file.', () => {
expect(os.type).toBeCalled() expect(os.type).toBeCalled()
} }
) )
test('getStableKubectlVersion() - download stable version file, read version and return it', async () => { test('getStableKubectlVersion() - download stable version file, read version and return it', async () => {
jest jest
.spyOn(toolCache, 'downloadTool') .spyOn(toolCache, 'downloadTool')
.mockReturnValue(Promise.resolve('pathToTool')) .mockReturnValue(Promise.resolve('pathToTool'))
jest.spyOn(fs, 'readFileSync').mockReturnValue('v1.20.4') jest.spyOn(fs, 'readFileSync').mockReturnValue('v1.20.4')
expect(await run.getStableKubectlVersion()).toBe('v1.20.4') expect(await run.getStableKubectlVersion()).toBe('v1.20.4')
expect(toolCache.downloadTool).toBeCalled() expect(toolCache.downloadTool).toBeCalled()
expect(fs.readFileSync).toBeCalledWith('pathToTool', 'utf8') expect(fs.readFileSync).toHaveBeenCalledWith('pathToTool', 'utf8')
}) })
test('getStableKubectlVersion() - return default v1.15.0 if version read is empty', async () => { test('getStableKubectlVersion() - return default v1.15.0 if version read is empty', async () => {
jest jest
.spyOn(toolCache, 'downloadTool') .spyOn(toolCache, 'downloadTool')
.mockReturnValue(Promise.resolve('pathToTool')) .mockReturnValue(Promise.resolve('pathToTool'))
jest.spyOn(fs, 'readFileSync').mockReturnValue('') jest.spyOn(fs, 'readFileSync').mockReturnValue('')
expect(await run.getStableKubectlVersion()).toBe('v1.15.0') expect(await run.getStableKubectlVersion()).toBe('v1.15.0')
expect(toolCache.downloadTool).toBeCalled() expect(toolCache.downloadTool).toBeCalled()
expect(fs.readFileSync).toBeCalledWith('pathToTool', 'utf8') expect(fs.readFileSync).toHaveBeenCalledWith('pathToTool', 'utf8')
}) })
test('getStableKubectlVersion() - return default v1.15.0 if unable to download file', async () => { test('getStableKubectlVersion() - return default v1.15.0 if unable to download file', async () => {
jest jest
.spyOn(toolCache, 'downloadTool') .spyOn(toolCache, 'downloadTool')
.mockRejectedValue('Unable to download.') .mockRejectedValue('Unable to download.')
expect(await run.getStableKubectlVersion()).toBe('v1.15.0') expect(await run.getStableKubectlVersion()).toBe('v1.15.0')
expect(toolCache.downloadTool).toBeCalled() expect(toolCache.downloadTool).toBeCalled()
}) })
test('downloadKubectl() - download kubectl, add it to toolCache and return path to it', async () => { test('downloadKubectl() - download kubectl, add it to toolCache and return path to it', async () => {
jest.spyOn(toolCache, 'find').mockReturnValue('') jest.spyOn(toolCache, 'find').mockReturnValue('')
jest jest
@@ -123,43 +105,37 @@ describe('Testing all functions in run file.', () => {
.mockReturnValue(Promise.resolve('pathToCachedTool')) .mockReturnValue(Promise.resolve('pathToCachedTool'))
jest.spyOn(os, 'type').mockReturnValue('Windows_NT') jest.spyOn(os, 'type').mockReturnValue('Windows_NT')
jest.spyOn(fs, 'chmodSync').mockImplementation(() => {}) jest.spyOn(fs, 'chmodSync').mockImplementation(() => {})
expect(await run.downloadKubectl('v1.15.0')).toBe( expect(await run.downloadKubectl('v1.15.0')).toBe(
path.join('pathToCachedTool', 'kubectl.exe') path.join('pathToCachedTool', 'kubectl.exe')
) )
expect(toolCache.find).toBeCalledWith('kubectl', 'v1.15.0') expect(toolCache.find).toHaveBeenCalledWith('kubectl', 'v1.15.0')
expect(toolCache.downloadTool).toBeCalled() expect(toolCache.downloadTool).toBeCalled()
expect(toolCache.cacheFile).toBeCalled() expect(toolCache.cacheFile).toBeCalled()
expect(os.type).toBeCalled() expect(os.type).toBeCalled()
expect(fs.chmodSync).toBeCalledWith( expect(fs.chmodSync).toHaveBeenCalledWith(
path.join('pathToCachedTool', 'kubectl.exe'), path.join('pathToCachedTool', 'kubectl.exe'),
'775' '775'
) )
}) })
test('downloadKubectl() - throw DownloadKubectlFailed error when unable to download kubectl', async () => { test('downloadKubectl() - throw DownloadKubectlFailed error when unable to download kubectl', async () => {
jest.spyOn(toolCache, 'find').mockReturnValue('') jest.spyOn(toolCache, 'find').mockReturnValue('')
jest jest
.spyOn(toolCache, 'downloadTool') .spyOn(toolCache, 'downloadTool')
.mockRejectedValue('Unable to download kubectl.') .mockRejectedValue('Unable to download kubectl.')
await expect(run.downloadKubectl('v1.15.0')).rejects.toThrow( await expect(run.downloadKubectl('v1.15.0')).rejects.toThrow(
'DownloadKubectlFailed' 'DownloadKubectlFailed'
) )
expect(toolCache.find).toBeCalledWith('kubectl', 'v1.15.0') expect(toolCache.find).toHaveBeenCalledWith('kubectl', 'v1.15.0')
expect(toolCache.downloadTool).toBeCalled() expect(toolCache.downloadTool).toBeCalled()
}) })
test('downloadKubectl() - throw kubectl not found error when receive 404 response', async () => { test('downloadKubectl() - throw kubectl not found error when receive 404 response', async () => {
const kubectlVersion = 'v1.15.0' const kubectlVersion = 'v1.15.0'
const arch = 'arm128' const arch = 'arm128'
jest.spyOn(os, 'arch').mockReturnValue(arch) jest.spyOn(os, 'arch').mockReturnValue(arch)
jest.spyOn(toolCache, 'find').mockReturnValue('') jest.spyOn(toolCache, 'find').mockReturnValue('')
jest.spyOn(toolCache, 'downloadTool').mockImplementation((_) => { jest.spyOn(toolCache, 'downloadTool').mockImplementation((_) => {
throw new toolCache.HTTPError(404) throw new toolCache.HTTPError(404)
}) })
await expect(run.downloadKubectl(kubectlVersion)).rejects.toThrow( await expect(run.downloadKubectl(kubectlVersion)).rejects.toThrow(
util.format( util.format(
"Kubectl '%s' for '%s' arch not found.", "Kubectl '%s' for '%s' arch not found.",
@@ -168,28 +144,26 @@ describe('Testing all functions in run file.', () => {
) )
) )
expect(os.arch).toBeCalled() expect(os.arch).toBeCalled()
expect(toolCache.find).toBeCalledWith('kubectl', kubectlVersion) expect(toolCache.find).toHaveBeenCalledWith('kubectl', kubectlVersion)
expect(toolCache.downloadTool).toBeCalled() expect(toolCache.downloadTool).toBeCalled()
}) })
test('downloadKubectl() - return path to existing cache of kubectl', async () => { test('downloadKubectl() - return path to existing cache of kubectl', async () => {
jest.spyOn(core, 'getInput').mockImplementation(() => 'v1.15.5')
jest.spyOn(toolCache, 'find').mockReturnValue('pathToCachedTool') jest.spyOn(toolCache, 'find').mockReturnValue('pathToCachedTool')
jest.spyOn(os, 'type').mockReturnValue('Windows_NT') jest.spyOn(os, 'type').mockReturnValue('Windows_NT')
jest.spyOn(fs, 'chmodSync').mockImplementation(() => {}) jest.spyOn(fs, 'chmodSync').mockImplementation(() => {})
jest.spyOn(toolCache, 'downloadTool') jest.spyOn(toolCache, 'downloadTool')
expect(await run.downloadKubectl('v1.15.0')).toBe( expect(await run.downloadKubectl('v1.15.0')).toBe(
path.join('pathToCachedTool', 'kubectl.exe') path.join('pathToCachedTool', 'kubectl.exe')
) )
expect(toolCache.find).toBeCalledWith('kubectl', 'v1.15.0') expect(toolCache.find).toHaveBeenCalledWith('kubectl', 'v1.15.0')
expect(os.type).toBeCalled() expect(os.type).toBeCalled()
expect(fs.chmodSync).toBeCalledWith( expect(fs.chmodSync).toHaveBeenCalledWith(
path.join('pathToCachedTool', 'kubectl.exe'), path.join('pathToCachedTool', 'kubectl.exe'),
'775' '775'
) )
expect(toolCache.downloadTool).not.toBeCalled() expect(toolCache.downloadTool).not.toBeCalled()
}) })
test('run() - download specified version and set output', async () => { test('run() - download specified version and set output', async () => {
jest.spyOn(core, 'getInput').mockReturnValue('v1.15.5') jest.spyOn(core, 'getInput').mockReturnValue('v1.15.5')
jest.spyOn(toolCache, 'find').mockReturnValue('pathToCachedTool') jest.spyOn(toolCache, 'find').mockReturnValue('pathToCachedTool')
@@ -198,16 +172,14 @@ describe('Testing all functions in run file.', () => {
jest.spyOn(core, 'addPath').mockImplementation() jest.spyOn(core, 'addPath').mockImplementation()
jest.spyOn(console, 'log').mockImplementation() jest.spyOn(console, 'log').mockImplementation()
jest.spyOn(core, 'setOutput').mockImplementation() jest.spyOn(core, 'setOutput').mockImplementation()
expect(await run.run()).toBeUndefined() expect(await run.run()).toBeUndefined()
expect(core.getInput).toBeCalledWith('version', {required: true}) expect(core.getInput).toHaveBeenCalledWith('version', {required: true})
expect(core.addPath).toBeCalledWith('pathToCachedTool') expect(core.addPath).toHaveBeenCalledWith('pathToCachedTool')
expect(core.setOutput).toBeCalledWith( expect(core.setOutput).toHaveBeenCalledWith(
'kubectl-path', 'kubectl-path',
path.join('pathToCachedTool', 'kubectl.exe') path.join('pathToCachedTool', 'kubectl.exe')
) )
}) })
test('run() - get latest version, download it and set output', async () => { test('run() - get latest version, download it and set output', async () => {
jest.spyOn(core, 'getInput').mockReturnValue('latest') jest.spyOn(core, 'getInput').mockReturnValue('latest')
jest jest
@@ -220,14 +192,13 @@ describe('Testing all functions in run file.', () => {
jest.spyOn(core, 'addPath').mockImplementation() jest.spyOn(core, 'addPath').mockImplementation()
jest.spyOn(console, 'log').mockImplementation() jest.spyOn(console, 'log').mockImplementation()
jest.spyOn(core, 'setOutput').mockImplementation() jest.spyOn(core, 'setOutput').mockImplementation()
expect(await run.run()).toBeUndefined() expect(await run.run()).toBeUndefined()
expect(toolCache.downloadTool).toBeCalledWith( expect(toolCache.downloadTool).toHaveBeenCalledWith(
'https://storage.googleapis.com/kubernetes-release/release/stable.txt' 'https://storage.googleapis.com/kubernetes-release/release/stable.txt'
) )
expect(core.getInput).toBeCalledWith('version', {required: true}) expect(core.getInput).toHaveBeenCalledWith('version', {required: true})
expect(core.addPath).toBeCalledWith('pathToCachedTool') expect(core.addPath).toHaveBeenCalledWith('pathToCachedTool')
expect(core.setOutput).toBeCalledWith( expect(core.setOutput).toHaveBeenCalledWith(
'kubectl-path', 'kubectl-path',
path.join('pathToCachedTool', 'kubectl.exe') path.join('pathToCachedTool', 'kubectl.exe')
) )

View File

@@ -89,5 +89,3 @@ export async function downloadKubectl(version: string): Promise<string> {
fs.chmodSync(kubectlPath, '775') fs.chmodSync(kubectlPath, '775')
return kubectlPath return kubectlPath
} }
run().catch(core.setFailed)