Skip to content

Commit 97e0b88

Browse files
committed
Parens were borked in two places. Also filter tests and README badge.
1 parent ff2e58d commit 97e0b88

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Serverless Python Requirements
22

33
[![serverless](http://public.serverless.com/badges/v3.svg)](http://www.serverless.com)
4-
[![CircleCI](https://circleci.com/gh/UnitedIncome/serverless-python-requirements.svg?style=shield)](https://circleci.com/gh/UnitedIncome/serverless-python-requirements)
4+
![Github Actions](https://github.com/UnitedIncome/serverless-python-requirements/workflows/Test/badge.svg)
55
[![npm](https://img.shields.io/npm/v/serverless-python-requirements.svg)](https://www.npmjs.com/package/serverless-python-requirements)
66
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
77

8-
A Serverless v1.x plugin to automatically bundle dependencies from
8+
A Serverless v5.x plugin to automatically bundle dependencies from
99
`requirements.txt` and make them available in your `PYTHONPATH`.
1010

1111
## Requires Serverless >= v1.34

lib/pip.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -444,9 +444,8 @@ function copyVendors(vendorFolder, targetFolder, serverless) {
444444
function requirementsFileExists(servicePath, options, fileName) {
445445
if (
446446
options.usePoetry &&
447-
fse.existsSync(
448-
path.join(servicePath, 'pyproject.toml') && isPoetryProject(servicePath)
449-
)
447+
fse.existsSync(path.join(servicePath, 'pyproject.toml')) &&
448+
isPoetryProject(servicePath)
450449
) {
451450
return true;
452451
}

test.js

+11-1
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,18 @@ const teardown = () => {
9191
removeSync('tests/base with a space');
9292
};
9393

94+
const testFilter = (() => {
95+
const elems = process.argv.slice(2); // skip ['node', 'test.js']
96+
if (elems.length) {
97+
return desc =>
98+
elems.some(text => desc.search(text) != -1) ? tape.test : tape.test.skip;
99+
} else {
100+
return desc => tape.test;
101+
}
102+
})();
103+
94104
const test = (desc, func, opts = {}) =>
95-
tape.test(desc, opts, async t => {
105+
testFilter(desc)(desc, opts, async t => {
96106
setup();
97107
let ended = false;
98108
try {

0 commit comments

Comments
 (0)