Skip to content

Commit 84dd4c3

Browse files
authored
Merge pull request #462 from miketheman/miketheman/update-node-version
chore(ci): get CI working again
2 parents ce466f9 + e559abb commit 84dd4c3

File tree

6 files changed

+22
-34
lines changed

6 files changed

+22
-34
lines changed

appveyor.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
version: '{build}'
22
init:
3-
- cmd: python -m pip install -U pip
4-
- cmd: pip install pipenv
5-
- cmd: pip install poetry==1.0.0a2
6-
- ps: npm i -g serverless
3+
- cmd: python3 -m pip install -U pip
4+
- cmd: pip3 install pipenv
5+
- cmd: pip3 install poetry
6+
- cmd: npm i -g serverless
77
build: off
88
test_script:
99
- cmd: >-

circle.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,11 @@ jobs:
3333
python get-poetry.py --preview --yes
3434
rm get-poetry.py
3535
# install nodejs
36-
- run: curl -sL https://deb.nodesource.com/setup_6.x | sudo bash - && sudo apt -y install nodejs
36+
- run: curl -sL https://deb.nodesource.com/setup_10.x | sudo bash - && sudo apt -y install nodejs
3737
# install serverless & depcheck
38-
- run: npm install -g serverless depcheck
38+
- run: npm install -g serverless
3939
# install deps
4040
- run: npm i
41-
# depcheck
42-
- run: depcheck .
4341
# lint:
4442
- run: npm run lint
4543
# test!

lib/pip.js

+7-9
Original file line numberDiff line numberDiff line change
@@ -119,20 +119,18 @@ function installRequirements(targetFolder, serverless, options) {
119119
);
120120

121121
const dockerCmd = [];
122-
const pipCmd = [
123-
options.pythonBin,
124-
'-m',
125-
'pip',
126-
'install'
127-
];
128-
129-
if (Array.isArray(options.pipCmdExtraArgs) && options.pipCmdExtraArgs.length > 0) {
122+
const pipCmd = [options.pythonBin, '-m', 'pip', 'install'];
123+
124+
if (
125+
Array.isArray(options.pipCmdExtraArgs) &&
126+
options.pipCmdExtraArgs.length > 0
127+
) {
130128
options.pipCmdExtraArgs.forEach(cmd => {
131129
const parts = cmd.split(/\s+/, 2);
132130
pipCmd.push(...parts);
133131
});
134132
}
135-
133+
136134
const pipCmds = [pipCmd];
137135
const postCmds = [];
138136
// Check if we're using the legacy --cache-dir command...

lib/poetry.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,14 @@ function pyprojectTomlToRequirements() {
1616

1717
const res = spawnSync(
1818
'poetry',
19-
['export', '--without-hashes', '-f', 'requirements.txt', '-o', 'requirements.txt'],
19+
[
20+
'export',
21+
'--without-hashes',
22+
'-f',
23+
'requirements.txt',
24+
'-o',
25+
'requirements.txt'
26+
],
2027
{
2128
cwd: this.servicePath
2229
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "serverless-python-requirements",
33
"version": "5.0.1",
44
"engines": {
5-
"node": ">=6.0"
5+
"node": ">=10.0"
66
},
77
"description": "Serverless Python Requirements Plugin",
88
"author": "United Income <[email protected]>",

test.js

-15
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ const sls = mkCommand('sls');
5252
const git = mkCommand('git');
5353
const npm = mkCommand('npm');
5454
const perl = mkCommand('perl');
55-
const poetry = mkCommand('poetry');
5655

5756
const setup = () => {
5857
removeSync(getUserCachePath());
@@ -1910,17 +1909,3 @@ test(
19101909
},
19111910
{ skip: !canUseDocker() }
19121911
);
1913-
1914-
// From this point on, the version of the poetry is 1.0.0a0
1915-
test('poetry1.0.0a0 py3.6 can package flask with default options', t => {
1916-
process.chdir('tests/poetry');
1917-
const path = npm(['pack', '../..']);
1918-
npm(['i', path]);
1919-
poetry(['self', 'update', '--preview', '1.0.0a0']);
1920-
sls(['package']);
1921-
const zipfiles = listZipFiles('.serverless/sls-py-req-test.zip');
1922-
t.true(zipfiles.includes(`flask${sep}__init__.py`), 'flask is packaged');
1923-
t.true(zipfiles.includes(`bottle.py`), 'bottle is packaged');
1924-
t.true(zipfiles.includes(`boto3${sep}__init__.py`), 'boto3 is packaged');
1925-
t.end();
1926-
});

0 commit comments

Comments
 (0)