Compare commits

...

4 Commits
v5 ... main

Author SHA1 Message Date
dependabot[bot]
30eafe9548
Bump prettier from 2.8.8 to 3.5.3 (#1046)
Some checks are pending
Validate Python e2e freethread / check-latest (ubuntu-22.04-arm, 3.13t) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} standard pyproject file (macos-latest, 3.13.0) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} standard pyproject file (macos-latest, 3.13.1) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} standard pyproject file (macos-latest, 3.13.2) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} standard pyproject file (ubuntu-22.04, 3.13.0) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} standard pyproject file (ubuntu-22.04-arm, 3.13.1) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} standard pyproject file (ubuntu-22.04, 3.13.1) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} standard pyproject file (ubuntu-22.04, 3.13.2) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} standard pyproject file (ubuntu-22.04-arm, 3.13.0) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} standard pyproject file (ubuntu-22.04-arm, 3.13.2) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} standard pyproject file (ubuntu-24.04-arm, 3.13.0) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} standard pyproject file (ubuntu-24.04-arm, 3.13.1) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} standard pyproject file (ubuntu-24.04-arm, 3.13.2) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} standard pyproject file (ubuntu-latest, 3.13.0) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} standard pyproject file (ubuntu-latest, 3.13.1) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} standard pyproject file (ubuntu-latest, 3.13.2) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} standard pyproject file (windows-latest, 3.13.0) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} standard pyproject file (windows-latest, 3.13.1) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} standard pyproject file (windows-latest, 3.13.2) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} poetry pyproject file (macos-13, 3.13.0) (push) Waiting to run
Validate Python e2e freethread / check-latest (ubuntu-22.04-arm, 3.14t-dev) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} poetry pyproject file (macos-13, 3.13.1) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} poetry pyproject file (macos-13, 3.13.2) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} poetry pyproject file (macos-latest, 3.13.0) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} poetry pyproject file (macos-latest, 3.13.1) (push) Waiting to run
Validate Python e2e freethread / check-latest (ubuntu-24.04-arm, 3.13t) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} poetry pyproject file (macos-latest, 3.13.2) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} poetry pyproject file (ubuntu-22.04, 3.13.0) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} poetry pyproject file (ubuntu-22.04, 3.13.1) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} poetry pyproject file (ubuntu-22.04, 3.13.2) (push) Waiting to run
* Bump prettier from 2.8.8 to 3.5.3

Bumps [prettier](https://github.com/prettier/prettier) from 2.8.8 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/2.8.8...3.5.3)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
...

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

* Enable cancelled checks

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aparna Jyothi <aparnajyothi-y@github.com>
2025-04-22 11:07:10 -05:00
dependabot[bot]
5d95bc16d4
Bump semver and @types/semver (#1091)
* Bump semver and @types/semver

Bumps [semver](https://github.com/npm/node-semver) and [@types/semver](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/semver). These dependencies needed to be updated together.

Updates `semver` from 7.6.0 to 7.7.1
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.6.0...v7.7.1)

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

---
updated-dependencies:
- dependency-name: semver
  dependency-version: 7.7.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: "@types/semver"
  dependency-version: 7.7.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

* Fixed check failures

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: HarithaVattikuti <73516759+HarithaVattikuti@users.noreply.github.com>
2025-04-22 11:04:22 -05:00
aparnajyothi-y
6ed2c67c8a
Fix for Candidate Not Iterable Error (#1082)
Some checks failed
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} (ubuntu-22.04, 3.13.0t) (push) Has started running
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} (ubuntu-22.04, 3.13.1t) (push) Has started running
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} (ubuntu-22.04, 3.13.2t) (push) Has started running
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} (ubuntu-22.04-arm, 3.13.1t) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} (ubuntu-22.04-arm, 3.13.2t) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} (ubuntu-24.04-arm, 3.13.0t) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} (ubuntu-24.04-arm, 3.13.1t) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} (ubuntu-24.04-arm, 3.13.2t) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} (windows-latest, 3.13.0t) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} (windows-latest, 3.13.1t) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} (ubuntu-latest, 3.13.2t) (push) Has started running
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} (windows-latest, 3.13.2t) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} version file (macos-13, 3.13.0t) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} version file (macos-13, 3.13.1t) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} version file (macos-13, 3.13.2t) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} version file (macos-latest, 3.13.0t) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} version file (macos-latest, 3.13.1t) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} version file (macos-latest, 3.13.2t) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} .tool-versions file (macos-13, 3.13.0t) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} version file (ubuntu-20.04, 3.13.1t) (push) Has started running
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} .tool-versions file (macos-13, 3.13.1t) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} version file (ubuntu-22.04, 3.13.0t) (push) Has started running
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} version file (ubuntu-22.04-arm, 3.13.0t) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} version file (ubuntu-22.04-arm, 3.13.1t) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} version file (ubuntu-22.04-arm, 3.13.2t) (push) Waiting to run
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} version file (ubuntu-24.04-arm, 3.13.0t) (push) Waiting to run
Validate Python e2e / Setup ${{ matrix.python }} ${{ matrix.os }} .tool-versions file (ubuntu-22.04, pypy3.11-7.3.18) (push) Failing after 14m59s
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} .tool-versions file (macos-13, 3.13.2t) (push) Waiting to run
Validate Python e2e / Setup ${{ matrix.python }} ${{ matrix.os }} .tool-versions file (ubuntu-latest, 3.13.2) (push) Failing after 15m35s
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} version file (ubuntu-24.04-arm, 3.13.1t) (push) Waiting to run
* candidates not iterable

* update the error message

* update error to debug

* update debug to info

* error message updates
2025-04-17 08:55:44 -05:00
aparnajyothi-y
e348410e00
Remove Ubuntu 20.04 from workflows due to deprecation from 2025-04-15 (#1065)
Some checks failed
Validate PyPy e2e / Setup PyPy ${{ matrix.pypy }} ${{ matrix.os }} (ubuntu-22.04, pypy-3.10-v7.x) (push) Failing after 11m23s
Validate PyPy e2e / Setup PyPy ${{ matrix.pypy }} ${{ matrix.os }} (ubuntu-22.04, pypy3.10-v7.3.17) (push) Failing after 11m21s
Validate PyPy e2e / Setup PyPy ${{ matrix.pypy }} ${{ matrix.os }} (ubuntu-22.04, pypy3.11-v7.3.19) (push) Failing after 11m18s
Validate PyPy e2e / Setup PyPy ${{ matrix.pypy }} ${{ matrix.os }} (ubuntu-22.04, pypy3.9) (push) Failing after 11m18s
Validate PyPy e2e / Setup PyPy ${{ matrix.pypy }} ${{ matrix.os }} (ubuntu-latest, pypy-2.7) (push) Failing after 11m17s
Validate PyPy e2e / Setup PyPy ${{ matrix.pypy }} ${{ matrix.os }} (ubuntu-latest, pypy-2.7-v7.3.12rc1) (push) Failing after 11m14s
Validate PyPy e2e / Setup PyPy ${{ matrix.pypy }} ${{ matrix.os }} (ubuntu-latest, pypy-3.10-nightly) (push) Failing after 11m12s
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} using freethread input parameter (ubuntu-22.04, 3.13.2) (push) Successful in 38s
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} using freethread input parameter (ubuntu-22.04, 3.14.0-alpha.6) (push) Successful in 24s
Validate Python e2e freethread / Setup ${{ matrix.python }} ${{ matrix.os }} using freethread input parameter (ubuntu-latest, 3.13.1) (push) Successful in 22s
Validate PyPy e2e / Setup PyPy ${{ matrix.pypy }} ${{ matrix.os }} (ubuntu-latest, pypy-3.10-v7.3.16) (push) Failing after 14m59s
Validate PyPy e2e / Setup PyPy ${{ matrix.pypy }} ${{ matrix.os }} (ubuntu-latest, pypy-3.10-v7.3.17) (push) Failing after 14m54s
Validate PyPy e2e / Setup PyPy ${{ matrix.pypy }} ${{ matrix.os }} (ubuntu-latest, pypy-3.10-v7.3.x) (push) Failing after 14m50s
Validate PyPy e2e / Setup PyPy ${{ matrix.pypy }} ${{ matrix.os }} (ubuntu-latest, pypy-3.10-v7.x) (push) Failing after 14m44s
Validate PyPy e2e / Setup PyPy ${{ matrix.pypy }} ${{ matrix.os }} (ubuntu-latest, pypy3.10-v7.3.17) (push) Failing after 14m39s
Validate PyPy e2e / Setup PyPy ${{ matrix.pypy }} ${{ matrix.os }} (ubuntu-latest, pypy3.11-v7.3.19) (push) Failing after 14m35s
Validate PyPy e2e / Setup PyPy ${{ matrix.pypy }} ${{ matrix.os }} (ubuntu-latest, pypy3.9) (push) Failing after 14m30s
Validate PyPy e2e / Check non-eol ${{ matrix.pypy }} on ${{ matrix.os }} (ubuntu-22.04, pypy-2.7) (push) Failing after 14m26s
Validate PyPy e2e / Check non-eol ${{ matrix.pypy }} on ${{ matrix.os }} (ubuntu-22.04, pypy-3.10) (push) Failing after 14m20s
Validate PyPy e2e / Check non-eol ${{ matrix.pypy }} on ${{ matrix.os }} (ubuntu-22.04, pypy-3.11) (push) Failing after 14m16s
Validate PyPy e2e / Setup PyPy ${{ matrix.pypy }} ${{ matrix.os }} (noenv) (ubuntu-22.04, pypy2.7) (push) Failing after 14m10s
Validate PyPy e2e / Setup PyPy ${{ matrix.pypy }} ${{ matrix.os }} (noenv) (ubuntu-22.04, pypy3.10-nightly) (push) Failing after 14m7s
Validate PyPy e2e / Setup PyPy ${{ matrix.pypy }} ${{ matrix.os }} (noenv) (ubuntu-22.04, pypy3.11) (push) Failing after 14m0s
Validate PyPy e2e / Setup PyPy ${{ matrix.pypy }} ${{ matrix.os }} (noenv) (ubuntu-22.04, pypy3.9) (push) Failing after 13m54s
Validate PyPy e2e / Setup PyPy ${{ matrix.pypy }} ${{ matrix.os }} (noenv) (ubuntu-latest, pypy2.7) (push) Failing after 13m50s
Validate PyPy e2e / Setup PyPy ${{ matrix.pypy }} ${{ matrix.os }} (noenv) (ubuntu-latest, pypy3.10-nightly) (push) Failing after 13m47s
Validate PyPy e2e / Setup PyPy ${{ matrix.pypy }} ${{ matrix.os }} (noenv) (ubuntu-latest, pypy3.11) (push) Failing after 13m42s
Validate PyPy e2e / Setup PyPy ${{ matrix.pypy }} ${{ matrix.os }} (noenv) (ubuntu-latest, pypy3.9) (push) Failing after 13m37s
Validate PyPy e2e / check-latest (ubuntu-22.04) (push) Failing after 13m31s
Validate PyPy e2e / check-latest (ubuntu-latest) (push) Failing after 13m27s
* remove ubuntu-20.04

* check failure fix

* remove spaces

* npm run format-check
2025-04-11 13:36:23 -05:00
14 changed files with 219 additions and 894 deletions

View File

@ -78,8 +78,12 @@ jobs:
python-version: pypy-3.11-v7.x
- os: ubuntu-22.04
python-version: pypy-3.11-v7.x
- os: ubuntu-22.04-arm
python-version: pypy-3.10-v7.x
- os: ubuntu-22.04-arm
python-version: pypy-3.11-v7.x
- os: ubuntu-22.04-arm
python-version: pypy-3.10-v7.x
steps:
- uses: actions/checkout@v4
- name: Setup Python

View File

@ -19,7 +19,6 @@ jobs:
matrix:
operating-system:
[
ubuntu-20.04,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,

View File

@ -21,7 +21,6 @@ jobs:
os:
[
macos-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
ubuntu-24.04-arm,
@ -77,7 +76,6 @@ jobs:
os:
[
macos-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
ubuntu-24.04-arm,

View File

@ -24,7 +24,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
ubuntu-24.04-arm,
@ -142,7 +141,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
ubuntu-24.04-arm,
@ -177,7 +175,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
ubuntu-24.04-arm,
@ -220,7 +217,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
ubuntu-24.04-arm,

View File

@ -24,7 +24,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
@ -62,7 +61,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
@ -103,7 +101,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
@ -142,7 +139,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
@ -184,7 +180,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
@ -226,7 +221,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
@ -258,7 +252,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
@ -371,7 +364,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
@ -461,7 +453,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,

View File

@ -24,7 +24,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
@ -69,7 +68,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
@ -117,7 +115,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
@ -163,7 +160,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
@ -214,7 +210,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
@ -265,7 +260,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
@ -300,7 +294,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
@ -419,7 +412,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,

Binary file not shown.

Binary file not shown.

View File

@ -8,10 +8,29 @@ import * as tc from '@actions/tool-cache';
jest.mock('@actions/http-client');
jest.mock('@actions/tool-cache');
const mockManifest = [{version: '1.0.0'}];
jest.mock('@actions/tool-cache', () => ({
getManifestFromRepo: jest.fn()
}));
const mockManifest = [
{
version: '1.0.0',
stable: true,
files: [
{
filename: 'tool-v1.0.0-linux-x64.tar.gz',
platform: 'linux',
arch: 'x64',
download_url: 'https://example.com/tool-v1.0.0-linux-x64.tar.gz'
}
]
}
];
describe('getManifest', () => {
beforeEach(() => {
jest.resetAllMocks();
});
it('should return manifest from repo', async () => {
(tc.getManifestFromRepo as jest.Mock).mockResolvedValue(mockManifest);
const manifest = await getManifest();

959
dist/setup/index.js vendored

File diff suppressed because it is too large Load Diff

52
package-lock.json generated
View File

@ -17,12 +17,12 @@
"@actions/io": "^1.0.2",
"@actions/tool-cache": "^2.0.1",
"@iarna/toml": "^3.0.0",
"semver": "^7.6.0"
"semver": "^7.7.1"
},
"devDependencies": {
"@types/jest": "^29.5.12",
"@types/node": "^20.11.25",
"@types/semver": "^7.5.8",
"@types/semver": "^7.7.0",
"@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.54.0",
"@vercel/ncc": "^0.38.3",
@ -32,7 +32,7 @@
"eslint-plugin-node": "^11.1.0",
"jest": "^29.7.0",
"jest-circus": "^29.7.0",
"prettier": "^2.8.4",
"prettier": "^3.5.3",
"ts-jest": "^29.1.2",
"typescript": "^5.4.2"
}
@ -1620,10 +1620,11 @@
}
},
"node_modules/@types/semver": {
"version": "7.5.8",
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz",
"integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==",
"dev": true
"version": "7.7.0",
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.0.tgz",
"integrity": "sha512-k107IF4+Xr7UHjwDc7Cfd6PRQfbdkiRabXGRjo07b4WyPahFBZCZ1sE+BNxYIJPPg73UkfOsVOLwqVc/6ETrIA==",
"dev": true,
"license": "MIT"
},
"node_modules/@types/stack-utils": {
"version": "2.0.3",
@ -4569,15 +4570,16 @@
}
},
"node_modules/prettier": {
"version": "2.8.8",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz",
"integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==",
"dev": true,
"license": "MIT",
"bin": {
"prettier": "bin-prettier.js"
"prettier": "bin/prettier.cjs"
},
"engines": {
"node": ">=10.13.0"
"node": ">=14"
},
"funding": {
"url": "https://github.com/prettier/prettier?sponsor=1"
@ -4812,12 +4814,10 @@
"integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA=="
},
"node_modules/semver": {
"version": "7.6.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz",
"integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==",
"dependencies": {
"lru-cache": "^6.0.0"
},
"version": "7.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz",
"integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==",
"license": "ISC",
"bin": {
"semver": "bin/semver.js"
},
@ -4825,22 +4825,6 @@
"node": ">=10"
}
},
"node_modules/semver/node_modules/lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
"dependencies": {
"yallist": "^4.0.0"
},
"engines": {
"node": ">=10"
}
},
"node_modules/semver/node_modules/yallist": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
},
"node_modules/shebang-command": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",

View File

@ -33,12 +33,12 @@
"@actions/io": "^1.0.2",
"@actions/tool-cache": "^2.0.1",
"@iarna/toml": "^3.0.0",
"semver": "^7.6.0"
"semver": "^7.7.1"
},
"devDependencies": {
"@types/jest": "^29.5.12",
"@types/node": "^20.11.25",
"@types/semver": "^7.5.8",
"@types/semver": "^7.7.0",
"@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.54.0",
"@vercel/ncc": "^0.38.3",
@ -48,7 +48,7 @@
"eslint-plugin-node": "^11.1.0",
"jest": "^29.7.0",
"jest-circus": "^29.7.0",
"prettier": "^2.8.4",
"prettier": "^3.5.3",
"ts-jest": "^29.1.2",
"typescript": "^5.4.2"
}

View File

@ -5,6 +5,7 @@ import * as exec from '@actions/exec';
import * as httpm from '@actions/http-client';
import {ExecOptions} from '@actions/exec/lib/interfaces';
import {IS_WINDOWS, IS_LINUX, getDownloadFileName} from './utils';
import {IToolRelease} from '@actions/tool-cache';
const TOKEN = core.getInput('token');
const AUTH = !TOKEN ? undefined : `token ${TOKEN}`;
@ -31,14 +32,41 @@ export async function findReleaseFromManifest(
return foundRelease;
}
function isIToolRelease(obj: any): obj is IToolRelease {
return (
typeof obj === 'object' &&
obj !== null &&
typeof obj.version === 'string' &&
typeof obj.stable === 'boolean' &&
Array.isArray(obj.files) &&
obj.files.every(
(file: any) =>
typeof file.filename === 'string' &&
typeof file.platform === 'string' &&
typeof file.arch === 'string' &&
typeof file.download_url === 'string'
)
);
}
export async function getManifest(): Promise<tc.IToolRelease[]> {
try {
return await getManifestFromRepo();
const repoManifest = await getManifestFromRepo();
if (
Array.isArray(repoManifest) &&
repoManifest.length &&
repoManifest.every(isIToolRelease)
) {
return repoManifest;
}
throw new Error(
'The repository manifest is invalid or does not include any valid tool release (IToolRelease) entries.'
);
} catch (err) {
core.debug('Fetching the manifest via the API failed.');
if (err instanceof Error) {
core.debug(err.message);
} else {
core.error('An unexpected error occurred while fetching the manifest.');
}
}
return await getManifestFromURL();
@ -93,6 +121,9 @@ async function installPython(workingDirectory: string) {
}
export async function installCpythonFromRelease(release: tc.IToolRelease) {
if (!release.files || release.files.length === 0) {
throw new Error('No files found in the release to download.');
}
const downloadUrl = release.files[0].download_url;
core.info(`Download from "${downloadUrl}"`);
@ -113,9 +144,13 @@ export async function installCpythonFromRelease(release: tc.IToolRelease) {
} catch (err) {
if (err instanceof tc.HTTPError) {
// Rate limit?
if (err.httpStatusCode === 403 || err.httpStatusCode === 429) {
if (err.httpStatusCode === 403) {
core.error(
`Received HTTP status code 403. This indicates a permission issue or restricted access.`
);
} else if (err.httpStatusCode === 429) {
core.info(
`Received HTTP status code ${err.httpStatusCode}. This usually indicates the rate limit has been exceeded`
`Received HTTP status code 429. This usually indicates the rate limit has been exceeded`
);
} else {
core.info(err.message);