Skip to content

Commit f716a72

Browse files
committed
configure python lint with go tooling
1 parent 4321211 commit f716a72

File tree

5 files changed

+31
-13
lines changed

5 files changed

+31
-13
lines changed

.github/workflows/affected.yaml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
name: Finding affected tests
2525
runs-on: ubuntu-latest
2626
outputs:
27-
python: ${{steps.python.outputs.affected}}
27+
python: ${{ steps.python.outputs.affected }}
2828
steps:
2929
- uses: actions/checkout@v4
3030
with:
@@ -33,4 +33,28 @@ jobs:
3333
with:
3434
go-version: ^1.23.0
3535
- run: go version
36-
- run: go install github.com/davidcavazos/testing-infra/cmd/affected@v0.0.1
36+
- run: go install github.com/davidcavazos/testing-infra/cmd/affected@v0.0.2
37+
- id: python
38+
run: |
39+
PYTHON=$(affected .github/workflows/python/config.json)
40+
echo "$PYTHON"
41+
echo "affected=$PYTHON" >> "$GITHUB_OUTPUT"
42+
43+
python-lint:
44+
name: Lint Python
45+
needs: affected
46+
runs-on: ubuntu-latest
47+
strategy:
48+
matrix:
49+
affected: ${{ fromJson(needs.affected.outputs.python) }}
50+
env:
51+
PACKAGE: ${{ toJson(matrix.affected.packages) }}
52+
steps:
53+
- uses: actions/checkout@v4
54+
- uses: actions/setup-python@v5
55+
with:
56+
python-version: '3.12'
57+
- run: pip install nox
58+
- run: echo "$PACKAGE"
59+
- working-directory: ${{ env.PACKAGE }}
60+
run: nox -s lint

.github/workflows/config/python.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"package": [
3+
"noxfile_config.py"
4+
]
5+
}

.github/workflows/python/config.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/workflows/python/lint.yaml

Whitespace-only changes.

.github/workflows/python/test.yaml

Whitespace-only changes.

0 commit comments

Comments
 (0)