Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

18 changes: 0 additions & 18 deletions .eslintrc.json

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Setup Node.js
uses: actions/setup-node@v4.4.0
uses: actions/setup-node@v5.0.0
with:
node-version-file: package.json
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ jobs:
units:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- run: npm ci
- run: npm test

# test action works running from the graph
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: ./
id: discover
with:
Expand All @@ -42,14 +42,14 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Dump project object
run: |
echo '${{ toJson(matrix.project) }}'

- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version-file: ${{ matrix.project.path }}

Expand Down
303 changes: 302 additions & 1 deletion __snapshots__/find-python-projects.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`find-python-projects Exports keys as instructed 1`] = `
{
Expand Down Expand Up @@ -48,6 +48,307 @@ exports[`find-python-projects Exports keys as instructed 1`] = `
}
`;

exports[`find-python-projects doesn't export commands we should globally skip 1`] = `
{
"paths": [
"test-fixtures/multi-project/project-1/pyproject.toml",
"test-fixtures/multi-project/project-2/pyproject.toml",
"test-fixtures/multi-project/project-4/pyproject.toml",
"test-fixtures/multi-project/project-5/pyproject.toml",
"test-fixtures/multi-project/project-6/pyproject.toml",
],
"projects": [
{
"buildBackend": "poetry.core.masonry.api",
"commands": {
"install": "poetry install",
},
"directory": "test-fixtures/multi-project/project-1",
"exports": {},
"name": "sub-project-1",
"path": "test-fixtures/multi-project/project-1/pyproject.toml",
"pythonVersion": "^3.9",
},
{
"buildBackend": "poetry.core.masonry.api",
"commands": {
"install": "poetry install",
"package": "poetry bundle venv .package/",
"something-arbitrary": "echo 'Example of arbitrary shell command'",
},
"directory": "test-fixtures/multi-project/project-2",
"exports": {},
"name": "sub-project-2",
"path": "test-fixtures/multi-project/project-2/pyproject.toml",
"pythonVersion": "^3.9",
},
{
"commands": {
"install": null,
},
"directory": "test-fixtures/multi-project/project-4",
"exports": {},
"name": "sub-project-4",
"path": "test-fixtures/multi-project/project-4/pyproject.toml",
"pythonVersion": "^3.9",
},
{
"buildBackend": "pdm.backend",
"commands": {
"install": "pdm install",
},
"directory": "test-fixtures/multi-project/project-5",
"exports": {},
"name": "project-5",
"path": "test-fixtures/multi-project/project-5/pyproject.toml",
"pythonVersion": "==3.12.*",
},
{
"buildBackend": "poetry.core.masonry.api",
"commands": {
"install": "poetry install",
},
"directory": "test-fixtures/multi-project/project-6",
"exports": {},
"name": "sub-project-6",
"path": "test-fixtures/multi-project/project-6/pyproject.toml",
"pythonVersion": "^3.9",
},
],
"projects-by-command": {
"install": [
{
"buildBackend": "poetry.core.masonry.api",
"commands": {
"install": "poetry install",
},
"directory": "test-fixtures/multi-project/project-1",
"exports": {},
"name": "sub-project-1",
"path": "test-fixtures/multi-project/project-1/pyproject.toml",
"pythonVersion": "^3.9",
},
{
"buildBackend": "poetry.core.masonry.api",
"commands": {
"install": "poetry install",
"package": "poetry bundle venv .package/",
"something-arbitrary": "echo 'Example of arbitrary shell command'",
},
"directory": "test-fixtures/multi-project/project-2",
"exports": {},
"name": "sub-project-2",
"path": "test-fixtures/multi-project/project-2/pyproject.toml",
"pythonVersion": "^3.9",
},
{
"buildBackend": "pdm.backend",
"commands": {
"install": "pdm install",
},
"directory": "test-fixtures/multi-project/project-5",
"exports": {},
"name": "project-5",
"path": "test-fixtures/multi-project/project-5/pyproject.toml",
"pythonVersion": "==3.12.*",
},
{
"buildBackend": "poetry.core.masonry.api",
"commands": {
"install": "poetry install",
},
"directory": "test-fixtures/multi-project/project-6",
"exports": {},
"name": "sub-project-6",
"path": "test-fixtures/multi-project/project-6/pyproject.toml",
"pythonVersion": "^3.9",
},
],
"package": [
{
"buildBackend": "poetry.core.masonry.api",
"commands": {
"install": "poetry install",
"package": "poetry bundle venv .package/",
"something-arbitrary": "echo 'Example of arbitrary shell command'",
},
"directory": "test-fixtures/multi-project/project-2",
"exports": {},
"name": "sub-project-2",
"path": "test-fixtures/multi-project/project-2/pyproject.toml",
"pythonVersion": "^3.9",
},
],
"something-arbitrary": [
{
"buildBackend": "poetry.core.masonry.api",
"commands": {
"install": "poetry install",
"package": "poetry bundle venv .package/",
"something-arbitrary": "echo 'Example of arbitrary shell command'",
},
"directory": "test-fixtures/multi-project/project-2",
"exports": {},
"name": "sub-project-2",
"path": "test-fixtures/multi-project/project-2/pyproject.toml",
"pythonVersion": "^3.9",
},
],
},
}
`;

exports[`find-python-projects doesn't export commands we should skip for certain projects 1`] = `
{
"paths": [
"test-fixtures/multi-project/project-1/pyproject.toml",
"test-fixtures/multi-project/project-2/pyproject.toml",
"test-fixtures/multi-project/project-4/pyproject.toml",
"test-fixtures/multi-project/project-5/pyproject.toml",
"test-fixtures/multi-project/project-6/pyproject.toml",
],
"projects": [
{
"buildBackend": "poetry.core.masonry.api",
"commands": {
"install": "poetry install",
},
"directory": "test-fixtures/multi-project/project-1",
"exports": {},
"name": "sub-project-1",
"path": "test-fixtures/multi-project/project-1/pyproject.toml",
"pythonVersion": "^3.9",
},
{
"buildBackend": "poetry.core.masonry.api",
"commands": {
"install": "poetry install",
"package": "poetry bundle venv .package/",
"test": "poetry run pytest",
},
"directory": "test-fixtures/multi-project/project-2",
"exports": {},
"name": "sub-project-2",
"path": "test-fixtures/multi-project/project-2/pyproject.toml",
"pythonVersion": "^3.9",
},
{
"commands": {
"install": null,
},
"directory": "test-fixtures/multi-project/project-4",
"exports": {},
"name": "sub-project-4",
"path": "test-fixtures/multi-project/project-4/pyproject.toml",
"pythonVersion": "^3.9",
},
{
"buildBackend": "pdm.backend",
"commands": {},
"directory": "test-fixtures/multi-project/project-5",
"exports": {},
"name": "project-5",
"path": "test-fixtures/multi-project/project-5/pyproject.toml",
"pythonVersion": "==3.12.*",
},
{
"buildBackend": "poetry.core.masonry.api",
"commands": {
"install": "poetry install",
"test": "poe test",
},
"directory": "test-fixtures/multi-project/project-6",
"exports": {},
"name": "sub-project-6",
"path": "test-fixtures/multi-project/project-6/pyproject.toml",
"pythonVersion": "^3.9",
},
],
"projects-by-command": {
"install": [
{
"buildBackend": "poetry.core.masonry.api",
"commands": {
"install": "poetry install",
},
"directory": "test-fixtures/multi-project/project-1",
"exports": {},
"name": "sub-project-1",
"path": "test-fixtures/multi-project/project-1/pyproject.toml",
"pythonVersion": "^3.9",
},
{
"buildBackend": "poetry.core.masonry.api",
"commands": {
"install": "poetry install",
"package": "poetry bundle venv .package/",
"test": "poetry run pytest",
},
"directory": "test-fixtures/multi-project/project-2",
"exports": {},
"name": "sub-project-2",
"path": "test-fixtures/multi-project/project-2/pyproject.toml",
"pythonVersion": "^3.9",
},
{
"buildBackend": "poetry.core.masonry.api",
"commands": {
"install": "poetry install",
"test": "poe test",
},
"directory": "test-fixtures/multi-project/project-6",
"exports": {},
"name": "sub-project-6",
"path": "test-fixtures/multi-project/project-6/pyproject.toml",
"pythonVersion": "^3.9",
},
],
"package": [
{
"buildBackend": "poetry.core.masonry.api",
"commands": {
"install": "poetry install",
"package": "poetry bundle venv .package/",
"test": "poetry run pytest",
},
"directory": "test-fixtures/multi-project/project-2",
"exports": {},
"name": "sub-project-2",
"path": "test-fixtures/multi-project/project-2/pyproject.toml",
"pythonVersion": "^3.9",
},
],
"test": [
{
"buildBackend": "poetry.core.masonry.api",
"commands": {
"install": "poetry install",
"package": "poetry bundle venv .package/",
"test": "poetry run pytest",
},
"directory": "test-fixtures/multi-project/project-2",
"exports": {},
"name": "sub-project-2",
"path": "test-fixtures/multi-project/project-2/pyproject.toml",
"pythonVersion": "^3.9",
},
{
"buildBackend": "poetry.core.masonry.api",
"commands": {
"install": "poetry install",
"test": "poe test",
},
"directory": "test-fixtures/multi-project/project-6",
"exports": {},
"name": "sub-project-6",
"path": "test-fixtures/multi-project/project-6/pyproject.toml",
"pythonVersion": "^3.9",
},
],
},
}
`;

exports[`find-python-projects finds projects 1`] = `
{
"paths": [
Expand Down
Loading
Loading