Compare commits

..

10 Commits

Author SHA1 Message Date
152ba7c4dd added Scripts to PATH on Windows (#173)
Co-authored-by: Nikita Bykov <v-nibyko@microsoft.com>
2020-12-18 15:32:23 +01:00
da8703fb23 update dist file (#166) 2020-12-08 11:00:17 -05:00
accf675719 Update @actions/core (#142) 2020-09-30 21:55:38 +02:00
614aa4aa1e Merge pull request #76 from actions/master
Update releases branch with latest changes
2020-03-26 16:49:22 +01:00
4ff1108c39 Update NPM packages (#75)
* Update NPM packages

* Format using prettier

* Update node version in workflow

* Add .gitattributes
2020-03-26 16:39:48 +01:00
a93e9d979a Merge pull request #73 from actions/dependabot/npm_and_yarn/acorn-5.7.4
Bump acorn from 5.7.3 to 5.7.4
2020-03-19 16:17:00 +01:00
b67fc24ab8 Bump acorn from 5.7.3 to 5.7.4
Bumps [acorn](https://github.com/acornjs/acorn) from 5.7.3 to 5.7.4.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/5.7.3...5.7.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-03-16 11:17:33 +00:00
53d19faf05 Merge pull request #69 from actions/master
Update releases/v1 with changes from master
2020-03-09 10:55:07 +01:00
948e5343c7 Revert "Update releases/v1 with changes from master (#67)" (#68)
This reverts commit bdd6409dc1.
2020-03-09 10:51:55 +01:00
bdd6409dc1 Update releases/v1 with changes from master (#67)
* Use ncc instead of saving node_modules

* Add branding and correctly point to main file

* Cleanup

* Update release script

* PR Feedback

* Update README.md

* Update README.md

* Update contributors.md

* Update description

* use node-version instead of version (deprecated)

* Update contributors.md

* Update README.md

* Update README.md

* Create yaml-lint-config.yml

* Create lint-yaml.yml

* Update README.md

* Update README.md

* Update contributors.md

* Update README.md

* Update terminology in comments

* Spelling & grammar

* Consistent file name references

* ncc build

* Address YAML linting errors

* Fix quotes

* Bump handlebars from 4.1.2 to 4.5.3

Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.1.2 to 4.5.3.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/wycats/handlebars.js/blob/master/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.1.2...v4.5.3)

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

* Run main workflow on PRs

* Match README to action.yml

* Update dist/index.js

* Update checkout action to v2

* Fix cross-platform build matrix example

* output installed version number after setup (#51)

* output installed version number after setup

* set output for the installed version

* Setup python + self hosted runners documentation

* Updates to npm packages (#66)

* npm package updates

* Updates to ncc build

* Update action.yml

* Update action.yml

Co-authored-by: Konrad Pabjan <Konrad.Pabjan@microsoft.com>
Co-authored-by: Edward Thomson <ethomson@edwardthomson.com>
Co-authored-by: conao3 <conao3@gmail.com>
Co-authored-by: Brian Cristante <brcrista@microsoft.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rui Chen <chenrui333@gmail.com>
Co-authored-by: Madhuri Gummalla <madhurig@github.com>
Co-authored-by: Ye-hyoung Kang <keepyourhonor@gmail.com>
Co-authored-by: Robin Daumann <26201853+robindaumann@users.noreply.github.com>
2020-03-09 10:38:24 +01:00
7 changed files with 6446 additions and 4903 deletions

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
* text=auto eol=lf

View File

@ -9,12 +9,12 @@ jobs:
operating-system: [ubuntu-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@master
uses: actions/checkout@v2
- name: Set Node.js 10.x
uses: actions/setup-node@master
- name: Set Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 10.x
node-version: 12.x
- name: npm install
run: npm install

View File

@ -5,21 +5,13 @@ import path = require('path');
const toolDir = path.join(
__dirname,
'runner',
path.join(
Math.random()
.toString(36)
.substring(7)
),
path.join(Math.random().toString(36).substring(7)),
'tools'
);
const tempDir = path.join(
__dirname,
'runner',
path.join(
Math.random()
.toString(36)
.substring(7)
),
path.join(Math.random().toString(36).substring(7)),
'temp'
);

7795
dist/index.js vendored

File diff suppressed because it is too large Load Diff

3491
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -23,27 +23,27 @@
"author": "GitHub",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.2.3",
"semver": "^6.1.1"
"@actions/core": "^1.2.6",
"semver": "^7.1.3"
},
"devDependencies": {
"@actions/io": "^1.0.2",
"@actions/tool-cache": "^1.3.2",
"@types/jest": "^24.9.1",
"@types/node": "^12.12.29",
"@types/semver": "^6.2.1",
"@zeit/ncc": "^0.20.5",
"husky": "^3.1.0",
"jest": "^24.9.0",
"jest-circus": "^24.9.0",
"prettier": "^1.19.1",
"ts-jest": "^24.3.0",
"@actions/tool-cache": "^1.3.3",
"@types/jest": "^25.1.4",
"@types/node": "^12.12.31",
"@types/semver": "^7.1.0",
"@zeit/ncc": "^0.22.0",
"husky": "^4.2.3",
"jest": "^25.1.0",
"jest-circus": "^25.1.0",
"prettier": "^2.0.2",
"ts-jest": "^25.2.1",
"typescript": "^3.8.3"
},
"husky": {
"skipCI": true,
"hooks": {
"pre-commit": "npm run build && npm run format"
"pre-commit": "npm run build && npm run format-check"
}
}
}

View File

@ -51,8 +51,11 @@ function binDir(installDir: string): string {
// A particular version of PyPy may contain one or more versions of the Python interpreter.
// For example, PyPy 7.0 contains Python 2.7, 3.5, and 3.6-alpha.
// We only care about the Python version, so we don't use the PyPy version for the tool cache.
function usePyPy(majorVersion: 2 | 3, architecture: string): InstalledVersion {
const findPyPy = tc.find.bind(undefined, 'PyPy', majorVersion.toString());
function usePyPy(
majorVersion: '2' | '3.6',
architecture: string
): InstalledVersion {
const findPyPy = tc.find.bind(undefined, 'PyPy', majorVersion);
let installDir: string | null = findPyPy(architecture);
if (!installDir && IS_WINDOWS) {
@ -77,6 +80,10 @@ function usePyPy(majorVersion: 2 | 3, architecture: string): InstalledVersion {
core.addPath(installDir);
core.addPath(_binDir);
// Starting from PyPy 7.3.1, the folder that is used for pip and anything that pip installs should be "Scripts" on Windows.
if (IS_WINDOWS) {
core.addPath(path.join(installDir, 'Scripts'));
}
const impl = 'pypy' + majorVersion.toString();
core.setOutput('python-version', impl);
@ -186,9 +193,10 @@ export async function findPythonVersion(
): Promise<InstalledVersion> {
switch (version.toUpperCase()) {
case 'PYPY2':
return usePyPy(2, architecture);
return usePyPy('2', architecture);
case 'PYPY3':
return usePyPy(3, architecture);
// keep pypy3 pointing to 3.6 for backward compatibility
return usePyPy('3.6', architecture);
default:
return await useCpythonVersion(version, architecture);
}