From 11c9de6408a035ffeb7dfb631efbe3ec5c0ee769 Mon Sep 17 00:00:00 2001 From: Brian Cristante Date: Fri, 27 Dec 2019 11:25:11 -0500 Subject: [PATCH 1/8] Update terminology in comments --- src/find-python.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/find-python.ts b/src/find-python.ts index 2721ba3..a36d568 100644 --- a/src/find-python.ts +++ b/src/find-python.ts @@ -57,7 +57,7 @@ function usePyPy(majorVersion: 2 | 3, architecture: string): void { if (!installDir && IS_WINDOWS) { // PyPy only precompiles binaries for x86, but the architecture parameter defaults to x64. - // On Hosted VS2017, we only install an x86 version. + // On our Windows virtual environments, we only install an x86 version. // Fall back to x86. installDir = findPyPy('x86'); } @@ -120,7 +120,7 @@ async function useCpythonVersion( if (IS_WINDOWS) { // Add --user directory - // `installDir` from tool cache should look like $AGENT_TOOLSDIRECTORY/Python//x64/ + // `installDir` from tool cache should look like $RUNNER_TOOL_CACHE/Python//x64/ // So if `findLocalTool` succeeded above, we must have a conformant `installDir` const version = path.basename(path.dirname(installDir)); const major = semver.major(version); From d0da811f3d9eee1e43b47e1812b611faee1088a3 Mon Sep 17 00:00:00 2001 From: Brian Cristante Date: Fri, 27 Dec 2019 11:26:49 -0500 Subject: [PATCH 2/8] Spelling & grammar --- docs/contributors.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/contributors.md b/docs/contributors.md index 29cceba..472a92a 100644 --- a/docs/contributors.md +++ b/docs/contributors.md @@ -2,9 +2,9 @@ ### Checkin -- Do checkin source (src) -- Do checkin a single index.js file after running `ncc` -- Do not checkin node_modules +- Do check in source (src) +- Do check in a single index.js file after running `ncc` +- Do not check in node_modules ### NCC @@ -12,7 +12,7 @@ In order to avoid uploading `node_modules` to the repository, we use [zeit/ncc]( ### Developing -If you're developing locally you can run +If you're developing locally, you can run ``` npm install tsc @@ -24,7 +24,7 @@ During the commit step, Husky will take care of formatting all files with [Prett ### Testing -We ask that you include a link to a succesfull run that utilizes the changes you are working on. For example, if your changes are in the branch `newAwesomeFeature`, then show an example run that uses `setup-python@newAwesomeFeature` or `my-fork@newAwesomeFeature`. This will help speed up testing and help us confirm that there are no breaking changes or bugs. +We ask that you include a link to a successful run that utilizes the changes you are working on. For example, if your changes are in the branch `newAwesomeFeature`, then show an example run that uses `setup-python@newAwesomeFeature` or `my-fork@newAwesomeFeature`. This will help speed up testing and help us confirm that there are no breaking changes or bugs. ### Releases From c57e58b1ee2ffdcfc34983c150a3bc10bd717cd8 Mon Sep 17 00:00:00 2001 From: Brian Cristante Date: Fri, 27 Dec 2019 11:28:48 -0500 Subject: [PATCH 3/8] Consistent file name references --- docs/contributors.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/contributors.md b/docs/contributors.md index 472a92a..0f2cfca 100644 --- a/docs/contributors.md +++ b/docs/contributors.md @@ -2,13 +2,13 @@ ### Checkin -- Do check in source (src) -- Do check in a single index.js file after running `ncc` -- Do not check in node_modules +- Do check in source (`src/`) +- Do check in a single `index.js` file after running `ncc` +- Do not check in `node_modules/` ### NCC -In order to avoid uploading `node_modules` to the repository, we use [zeit/ncc](https://github.com/zeit/ncc) to create a single `index.js` file that gets saved in `dist/`. +In order to avoid uploading `node_modules/` to the repository, we use [zeit/ncc](https://github.com/zeit/ncc) to create a single `index.js` file that gets saved in `dist/`. ### Developing @@ -18,7 +18,7 @@ npm install tsc ncc build ``` -Any files generated using `tsc` will be added to `lib/*`, however those files also are not uploaded to the repository and are exluded using `.gitignore`. +Any files generated using `tsc` will be added to `lib/`, however those files also are not uploaded to the repository and are exluded using `.gitignore`. During the commit step, Husky will take care of formatting all files with [Prettier](https://github.com/prettier/prettier) From 5e1c8c0ba41925367b8c3049fcfbaeb33a4ab395 Mon Sep 17 00:00:00 2001 From: Brian Cristante Date: Fri, 27 Dec 2019 12:56:56 -0500 Subject: [PATCH 4/8] ncc build --- dist/index.js | 169 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 156 insertions(+), 13 deletions(-) diff --git a/dist/index.js b/dist/index.js index 38c5ff2..de26419 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,3 +1,79 @@ +module.exports = +/******/ (function(modules, runtime) { // webpackBootstrap +/******/ "use strict"; +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ __webpack_require__.ab = __dirname + "/"; +/******/ +/******/ // the startup function +/******/ function startup() { +/******/ // Load entry module and return exports +/******/ return __webpack_require__(264); +/******/ }; +/******/ +/******/ // run startup +/******/ return startup(); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ 16: +/***/ (function(module) { + +module.exports = require("tls"); + +/***/ }), + +/***/ 87: +/***/ (function(module) { + +module.exports = require("os"); + +/***/ }), + +/***/ 129: +/***/ (function(module) { + +module.exports = require("child_process"); + +/***/ }), + +/***/ 211: +/***/ (function(module) { + +module.exports = require("https"); + +/***/ }), + +/***/ 264: +/***/ (function(module, __unusedexports, __webpack_require__) { + module.exports = /******/ (function(modules, runtime) { // webpackBootstrap /******/ "use strict"; @@ -46,47 +122,47 @@ module.exports = /***/ 16: /***/ (function(module) { -module.exports = require("tls"); +module.exports = __webpack_require__(16); /***/ }), /***/ 87: /***/ (function(module) { -module.exports = require("os"); +module.exports = __webpack_require__(87); /***/ }), /***/ 129: /***/ (function(module) { -module.exports = require("child_process"); +module.exports = __webpack_require__(129); /***/ }), /***/ 211: /***/ (function(module) { -module.exports = require("https"); +module.exports = __webpack_require__(211); /***/ }), /***/ 357: /***/ (function(module) { -module.exports = require("assert"); +module.exports = __webpack_require__(357); /***/ }), /***/ 417: /***/ (function(module) { -module.exports = require("crypto"); +module.exports = __webpack_require__(417); /***/ }), /***/ 429: -/***/ (function(module, __unusedexports, __webpack_require__) { +/***/ (function(module, __unusedexports, __nested_webpack_require_2019__) { module.exports = /******/ (function(modules, runtime) { // webpackBootstrap @@ -136,28 +212,28 @@ module.exports = /***/ 16: /***/ (function(module) { -module.exports = __webpack_require__(16); +module.exports = __nested_webpack_require_2019__(16); /***/ }), /***/ 87: /***/ (function(module) { -module.exports = __webpack_require__(87); +module.exports = __nested_webpack_require_2019__(87); /***/ }), /***/ 129: /***/ (function(module) { -module.exports = __webpack_require__(129); +module.exports = __nested_webpack_require_2019__(129); /***/ }), /***/ 211: /***/ (function(module) { -module.exports = __webpack_require__(211); +module.exports = __nested_webpack_require_2019__(211); /***/ }), @@ -5404,14 +5480,67 @@ module.exports = __nested_webpack_require_1759__(835); /***/ 357: /***/ (function(module) { -module.exports = __webpack_require__(357); +module.exports = __nested_webpack_require_2019__(357); /***/ }), /***/ 417: /***/ (function(module) { -module.exports = __webpack_require__(417); +module.exports = __nested_webpack_require_2019__(417); + +/***/ }), + +/***/ 605: +/***/ (function(module) { + +module.exports = __nested_webpack_require_2019__(605); + +/***/ }), + +/***/ 614: +/***/ (function(module) { + +module.exports = __nested_webpack_require_2019__(614); + +/***/ }), + +/***/ 622: +/***/ (function(module) { + +module.exports = __nested_webpack_require_2019__(622); + +/***/ }), + +/***/ 631: +/***/ (function(module) { + +module.exports = __nested_webpack_require_2019__(631); + +/***/ }), + +/***/ 669: +/***/ (function(module) { + +module.exports = __nested_webpack_require_2019__(669); + +/***/ }), + +/***/ 747: +/***/ (function(module) { + +module.exports = __nested_webpack_require_2019__(747); + +/***/ }), + +/***/ 835: +/***/ (function(module) { + +module.exports = __nested_webpack_require_2019__(835); + +/***/ }) + +/******/ }); /***/ }), @@ -5468,6 +5597,20 @@ module.exports = __webpack_require__(835); /***/ }), +/***/ 357: +/***/ (function(module) { + +module.exports = require("assert"); + +/***/ }), + +/***/ 417: +/***/ (function(module) { + +module.exports = require("crypto"); + +/***/ }), + /***/ 605: /***/ (function(module) { From c63dffb05630c746f1caccce7bf1b8ff0d413979 Mon Sep 17 00:00:00 2001 From: Brian Cristante Date: Fri, 27 Dec 2019 13:08:34 -0500 Subject: [PATCH 5/8] Address YAML linting errors --- action.yml | 7 ++++--- yaml-lint-config.yml | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/action.yml b/action.yml index a9074cc..6552f3c 100644 --- a/action.yml +++ b/action.yml @@ -1,9 +1,10 @@ +--- name: 'Setup Python' -description: 'Set up a specific version of Python and add the command-line tools to the PATH' +description: 'Set up a specific version of Python and add the command-line tools to the PATH.' author: 'GitHub' inputs: python-version: - description: 'Version range or exact version of a Python version to use, using semvers version range syntax.' + description: 'Version range or exact version of a Python version to use, using SemVer's version range syntax.' default: '3.x' architecture: description: 'The target architecture (x86, x64) of the Python interpreter.' @@ -13,4 +14,4 @@ runs: main: 'dist/index.js' branding: icon: 'code' - color: 'yellow' \ No newline at end of file + color: 'yellow' diff --git a/yaml-lint-config.yml b/yaml-lint-config.yml index addf0aa..52bd3a1 100644 --- a/yaml-lint-config.yml +++ b/yaml-lint-config.yml @@ -1,7 +1,7 @@ extends: default rules: - # 80 chars should be enough, but don't fail if a line is longer + # 120 chars should be enough, but don't fail if a line is longer line-length: - max: 80 + max: 120 level: warning From 4f72cbc6218ab89f35becfcac64d4c40e5a99495 Mon Sep 17 00:00:00 2001 From: Brian Cristante Date: Fri, 27 Dec 2019 13:15:28 -0500 Subject: [PATCH 6/8] Fix quotes --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 6552f3c..e600a06 100644 --- a/action.yml +++ b/action.yml @@ -4,7 +4,7 @@ description: 'Set up a specific version of Python and add the command-line tools author: 'GitHub' inputs: python-version: - description: 'Version range or exact version of a Python version to use, using SemVer's version range syntax.' + description: "Version range or exact version of a Python version to use, using SemVer's version range syntax." default: '3.x' architecture: description: 'The target architecture (x86, x64) of the Python interpreter.' From 4a251cd31c7e6519959caae30a2835cc393c0029 Mon Sep 17 00:00:00 2001 From: Brian Cristante Date: Mon, 30 Dec 2019 10:25:03 -0500 Subject: [PATCH 7/8] Run main workflow on PRs --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 4558c6f..59371d4 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -1,5 +1,5 @@ name: Main workflow -on: [push] +on: [push, pull_request] jobs: run: name: Run From d8bca2ddbad8a3b1577e1ea286b22eb2c7b02793 Mon Sep 17 00:00:00 2001 From: Brian Cristante Date: Mon, 30 Dec 2019 10:27:46 -0500 Subject: [PATCH 8/8] Match README to action.yml --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8d9a9dd..e339517 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ steps: - uses: actions/checkout@v1 - uses: actions/setup-python@v1 with: - python-version: '3.x' # Version range or exact version of a Python version to use, using semvers version range syntax. + python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified - run: python my_script.py ```