Skip to content

Commit db3e110

Browse files
authored
Fix lint actions (chronicle#573)
* delete old not working linter workflow * revert mp code check workflow * spacing * workflow for third-party integrations linter * workflow for google integrations linter * lint-test workflow * fixed workflow issues * change naming
1 parent b93ee91 commit db3e110

8 files changed

Lines changed: 164 additions & 7 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,14 @@ jobs:
3232
steps:
3333
- name: Checkout repository
3434
uses: actions/checkout@v4
35+
with:
36+
fetch-depth: 0
3537

3638
- name: Check for changes
3739
uses: dorny/paths-filter@v3
3840
id: filter
3941
with:
42+
base: ${{ github.event.pull_request.base.sha || github.event.before }}
4043
filters: |
4144
mp:
4245
- 'packages/mp/**'
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Google Integration Code Checks
2+
permissions:
3+
contents: read
4+
on:
5+
push:
6+
branches:
7+
- '**'
8+
paths:
9+
- 'content/response_integrations/google/**'
10+
11+
pull_request:
12+
branches:
13+
- '**'
14+
paths:
15+
- 'content/response_integrations/google/**'
16+
17+
jobs:
18+
mp_check:
19+
name: Code Linter
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
28+
- name: Set up Python
29+
uses: actions/setup-python@v5
30+
with:
31+
python-version: '3.11'
32+
33+
- name: Install mp package
34+
run: |
35+
pip install --upgrade pip
36+
pip install -e ./packages/mp
37+
38+
- name: Run mp check with changed files
39+
shell: bash
40+
run: |
41+
mp config --root-path . --processes 10 --display-config
42+
mp check --changed-files --raise-error-on-violations --output-format grouped

.github/workflows/lint.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,17 @@ jobs:
3030
package_envcommon: ${{ steps.filter.outputs.package_envcommon }}
3131
package_tipcommon: ${{ steps.filter.outputs.package_tipcommon }}
3232
package_integration_testing: ${{ steps.filter.outputs.package_integration_testing }}
33-
google_files: ${{ steps.filter.outputs.response_integrations_google_files }}
34-
third_party_files: ${{ steps.filter.outputs.response_integrations_third_party_files }}
3533
steps:
3634
- name: Checkout repository
3735
uses: actions/checkout@v4
36+
with:
37+
fetch-depth: 0
3838

3939
- name: Check for changes
4040
uses: dorny/paths-filter@v3
4141
id: filter
4242
with:
43+
base: ${{ github.event.pull_request.base.sha || github.event.before }}
4344
filters: |
4445
response_integrations_google:
4546
- 'content/response_integrations/google/**'
@@ -75,10 +76,12 @@ jobs:
7576
python -m pip install uv
7677
uv pip install --system -e ./packages/mp
7778
78-
- name: Run mp Check
79+
- name: Run Check
7980
shell: bash
8081
run: |
81-
mp check --static-type-check --raise-error-on-violations --output-format grouped ${{ needs.changes.outputs.google_files }}
82+
mp config --root-path . --processes 10 --display-config
83+
cd content/response_integrations/google
84+
mp check --changed-files --raise-error-on-violations --output-format grouped
8285
8386
lint_third_party:
8487
name: Lint Third-Party Integrations
@@ -101,10 +104,12 @@ jobs:
101104
python -m pip install uv
102105
uv pip install --system -e ./packages/mp
103106
104-
- name: Run mp Check
107+
- name: Run Check
105108
shell: bash
106109
run: |
107-
mp check --raise-error-on-violations --output-format grouped ${{ needs.changes.outputs.third_party_files }}
110+
mp config --root-path . --processes 10 --display-config
111+
cd content/response_integrations/third_party
112+
mp check --changed-files --raise-error-on-violations --output-format grouped
108113
109114
mp_package_linter:
110115
name: mp Package Linter
@@ -223,4 +228,4 @@ jobs:
223228
run: |
224229
uv sync --dev
225230
source .venv/bin/activate
226-
ruff check --output-format grouped
231+
ruff check --output-format grouped
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: "mp Code Checks"
2+
permissions:
3+
contents: read
4+
on:
5+
push:
6+
branches:
7+
- '**'
8+
paths:
9+
- 'packages/mp/**'
10+
11+
pull_request:
12+
branches:
13+
- '**'
14+
paths:
15+
- 'packages/mp/**'
16+
17+
18+
jobs:
19+
mp_check:
20+
name: mp Linter
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
29+
- name: Set up Python
30+
uses: actions/setup-python@v5
31+
with:
32+
python-version: '3.11'
33+
34+
- name: Install uv package
35+
# language=bash
36+
run: |
37+
python -m pip install --upgrade pip
38+
python -m pip install uv
39+
40+
- name: Run ruff
41+
working-directory: packages/mp
42+
# language=bash
43+
run: |
44+
uv sync --dev
45+
source .venv/bin/activate
46+
ruff check --output-format grouped
47+
48+
- name: Run ty
49+
working-directory: packages/mp
50+
# language=bash
51+
run: |
52+
uv sync --dev
53+
source .venv/bin/activate
54+
ty check --output-format concise

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,14 @@ jobs:
2424
steps:
2525
- name: Checkout repository
2626
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 0
2729

2830
- name: Check for changes
2931
uses: dorny/paths-filter@v3
3032
id: filter
3133
with:
34+
base: ${{ github.event.pull_request.base.sha }}
3235
filters: |
3336
mp:
3437
- 'packages/mp/**'
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Third-Party Integration Code Checks
2+
permissions:
3+
contents: read
4+
on:
5+
push:
6+
branches:
7+
- '**'
8+
paths:
9+
- 'content/response_integrations/third_party/**'
10+
11+
pull_request:
12+
branches:
13+
- '**'
14+
paths:
15+
- 'content/response_integrations/third_party/**'
16+
17+
jobs:
18+
mp_check:
19+
name: Code Linter
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
28+
- name: Set up Python
29+
uses: actions/setup-python@v5
30+
with:
31+
python-version: '3.11'
32+
33+
- name: Install mp package
34+
run: |
35+
pip install --upgrade pip
36+
pip install -e ./packages/mp
37+
38+
- name: Run mp check with changed files
39+
shell: bash
40+
run: |
41+
mp config --root-path . --processes 10 --display-config
42+
mp check --changed-files --raise-error-on-violations --output-format grouped

.github/workflows/validate.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,14 @@ jobs:
3131
steps:
3232
- name: Checkout repository
3333
uses: actions/checkout@v4
34+
with:
35+
fetch-depth: 0
3436

3537
- name: Check for changes
3638
uses: dorny/paths-filter@v3
3739
id: filter
3840
with:
41+
base: ${{ github.event.pull_request.base.sha || github.event.before }}
3942
filters: |
4043
mp:
4144
- 'packages/mp/**'

.github/workflows/windows_workflows.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212

1313
jobs:
1414
changes:
15+
name: Detect Changes
1516
runs-on: ubuntu-latest
1617
outputs:
1718
mp: ${{ steps.filter.outputs.mp }}
@@ -22,10 +23,14 @@ jobs:
2223
steps:
2324
- name: Checkout repository
2425
uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
2529
- name: Check for changes
2630
uses: dorny/paths-filter@v3
2731
id: filter
2832
with:
33+
base: ${{ github.event.pull_request.base.sha || github.event.before }}
2934
filters: |
3035
mp:
3136
- 'packages/mp/**'

0 commit comments

Comments
 (0)