Skip to content

Commit 76f22dd

Browse files
committed
feat: add tests
1 parent 53c7404 commit 76f22dd

File tree

11 files changed

+484
-358
lines changed

11 files changed

+484
-358
lines changed

__snapshots__/find-python-projects.test.js.snap

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,49 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3+
exports[`find-python-projects Exports keys as instructed 1`] = `
4+
{
5+
"paths": [
6+
"test-fixtures/project-with-exports/pyproject.toml",
7+
],
8+
"projects": [
9+
{
10+
"buildBackend": "poetry.core.masonry.api",
11+
"commands": {
12+
"install": "poetry install",
13+
},
14+
"directory": "test-fixtures/project-with-exports",
15+
"name": "single-project",
16+
"path": "test-fixtures/project-with-exports/pyproject.toml",
17+
"pythonVersion": "^3.9",
18+
"tool.export.me.please": {
19+
"foo": "bar",
20+
"one": 1,
21+
"true": true,
22+
},
23+
},
24+
],
25+
"projects-by-command": {
26+
"install": [
27+
{
28+
"buildBackend": "poetry.core.masonry.api",
29+
"commands": {
30+
"install": "poetry install",
31+
},
32+
"directory": "test-fixtures/project-with-exports",
33+
"name": "single-project",
34+
"path": "test-fixtures/project-with-exports/pyproject.toml",
35+
"pythonVersion": "^3.9",
36+
"tool.export.me.please": {
37+
"foo": "bar",
38+
"one": 1,
39+
"true": true,
40+
},
41+
},
42+
],
43+
},
44+
}
45+
`;
46+
347
exports[`find-python-projects finds projects 1`] = `
448
{
549
"paths": [

action.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@ inputs:
1010
description: Directory root for where to begin recursively searching for projects. Python projects contained in this directory or lower will be discovered.
1111
required: false
1212
default: '.'
13-
desired-export-path:
14-
description: What TOML key to export.
13+
desired-export-paths:
14+
description: What TOML keys to export. Comma separated list.
1515
required: false
16-
default: '.'
17-
16+
default: ''
1817

1918
outputs:
2019
paths:

0 commit comments

Comments
 (0)