Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: actions/setup-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.3.4
Choose a base ref
...
head repository: actions/setup-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.0.0
Choose a head ref
  • 3 commits
  • 13 files changed
  • 1 contributor

Commits on Feb 25, 2022

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    93cb78f View commit details
  2. Copy the full SHA
    665cd78 View commit details

Commits on Feb 28, 2022

  1. Copy the full SHA
    0ebf233 View commit details
4 changes: 2 additions & 2 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
@@ -23,10 +23,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Set Node.js 12.x
- name: Set Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 16.x

- name: Install dependencies
run: npm ci
6 changes: 3 additions & 3 deletions .github/workflows/licensed.yml
Original file line number Diff line number Diff line change
@@ -14,15 +14,15 @@ jobs:
name: Check licenses
steps:
- uses: actions/checkout@v2
- name: Set Node.js 12.x
- name: Set Node.js 16.x
uses: actions/setup-node@v2
with:
node-version: 12.x
node-version: 16.x
- run: npm ci
- name: Install licensed
run: |
cd $RUNNER_TEMP
curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/3.3.1/licensed-3.3.1-linux-x64.tar.gz
curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/3.4.4/licensed-3.4.4-linux-x64.tar.gz
sudo tar -xzf licensed.tar.gz
sudo mv licensed /usr/local/bin/licensed
- run: licensed status
20 changes: 0 additions & 20 deletions .github/workflows/test-python.yml
Original file line number Diff line number Diff line change
@@ -91,23 +91,3 @@ jobs:
- name: Run simple code
run: python -c 'import math; print(math.factorial(5))'

setup-pypy-legacy:
name: Setup PyPy ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-10.15, windows-2019, ubuntu-18.04, ubuntu-20.04]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: setup-python pypy3
uses: ./
with:
python-version: 'pypy3'

- name: setup-python pypy2
uses: ./
with:
python-version: 'pypy2'
8 changes: 4 additions & 4 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -19,13 +19,13 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Set Node.js 12.x
- name: Set Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 16.x

- name: npm install
run: npm install
- name: npm ci
run: npm ci

- name: Lint
run: npm run format-check
2 changes: 1 addition & 1 deletion .licenses/npm/@types/node.dep.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 4 additions & 12 deletions __tests__/finder.test.ts
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ describe('Finder tests', () => {
await io.mkdirP(pythonDir);
fs.writeFileSync(`${pythonDir}.complete`, 'hello');
// This will throw if it doesn't find it in the cache and in the manifest (because no such version exists)
await finder.findPythonVersion('3.x', 'x64');
await finder.useCpythonVersion('3.x', 'x64');
});

it('Finds stable Python version if it is not installed, but exists in the manifest', async () => {
@@ -52,7 +52,7 @@ describe('Finder tests', () => {
fs.writeFileSync(`${pythonDir}.complete`, 'hello');
});
// This will throw if it doesn't find it in the cache and in the manifest (because no such version exists)
await finder.findPythonVersion('1.2.3', 'x64');
await finder.useCpythonVersion('1.2.3', 'x64');
});

it('Finds pre-release Python version in the manifest', async () => {
@@ -74,25 +74,17 @@ describe('Finder tests', () => {
fs.writeFileSync(`${pythonDir}.complete`, 'hello');
});
// This will throw if it doesn't find it in the manifest (because no such version exists)
await finder.findPythonVersion('1.2.3-beta.2', 'x64');
await finder.useCpythonVersion('1.2.3-beta.2', 'x64');
});

it('Errors if Python is not installed', async () => {
// This will throw if it doesn't find it in the cache and in the manifest (because no such version exists)
let thrown = false;
try {
await finder.findPythonVersion('3.300000', 'x64');
await finder.useCpythonVersion('3.300000', 'x64');
} catch {
thrown = true;
}
expect(thrown).toBeTruthy();
});

it('Finds PyPy if it is installed', async () => {
const pythonDir: string = path.join(toolDir, 'PyPy', '2.0.0', 'x64');
await io.mkdirP(pythonDir);
fs.writeFileSync(`${pythonDir}.complete`, 'hello');
// This will throw if it doesn't find it in the cache (because no such version exists)
await finder.findPythonVersion('pypy2', 'x64');
});
});
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ outputs:
python-version:
description: "The installed python version. Useful when given a version range as input."
runs:
using: 'node12'
using: 'node16'
main: 'dist/setup/index.js'
post: 'dist/cache-save/index.js'
post-if: success()
54 changes: 40 additions & 14 deletions dist/cache-save/index.js
Original file line number Diff line number Diff line change
@@ -37180,6 +37180,25 @@ Object.defineProperty(exports, "__esModule", { value: true });

"use strict";

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
@@ -37189,14 +37208,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.State = void 0;
const cache = __importStar(__webpack_require__(692));
const core = __importStar(__webpack_require__(470));
var State;
@@ -45804,6 +45817,25 @@ module.exports = require("stream");

"use strict";

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
@@ -45813,17 +45845,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.run = void 0;
const core = __importStar(__webpack_require__(470));
const cache = __importStar(__webpack_require__(692));
const fs_1 = __importDefault(__webpack_require__(747));
Loading