Skip to content

Commit ea2acda

Browse files
committed
♻️ harmonize github actions
1 parent bc2dad4 commit ea2acda

15 files changed

+90
-83
lines changed

.github/workflows/docs.yml renamed to .github/workflows/_docs.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44
name: Publish Documentation
55

66
on:
7-
release:
8-
types: [ published ]
9-
10-
# Allows running this workflow manually from the Actions tab
7+
workflow_call:
118
workflow_dispatch:
129

1310
jobs:

.github/workflows/publish.yml renamed to .github/workflows/_publish.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44
name: Publish
55

66
on:
7-
release:
8-
types: [ published ]
9-
10-
# Allows running this workflow manually from the Actions tab
7+
workflow_call:
118
workflow_dispatch:
129

1310
jobs:

.github/workflows/linting.yml renamed to .github/workflows/_static-analysis.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
name: Static Analysis
55

66
on:
7-
- push
7+
workflow_call:
88

99
jobs:
1010
static-check:
@@ -30,9 +30,17 @@ jobs:
3030
${{ runner.os }}-lint-
3131
3232
- name: Install dependencies
33-
# We install the full dev requirements to make sure everything installs OK
3433
run: |
3534
python -m pip install pip
35+
pip install pylic~=3.6.1
36+
pip install -e .
37+
38+
- name: License check
39+
run: |
40+
pylic check --allow-extra-safe-licenses
41+
42+
- name: Install lint dependencies
43+
run: |
3644
pip install -e .[lint]
3745
3846
- name: Cache pre-commit

.github/workflows/sync-readme.yml renamed to .github/workflows/_sync-readme.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
name: Sync `documentation` directory to ReadMe
22

3-
# Run workflow for every push to the `main` branch
43
on:
4+
workflow_call:
55
workflow_dispatch:
6-
release:
7-
branches:
8-
- main
96

107
jobs:
118
sync:

.github/workflows/test-code-samples.yml renamed to .github/workflows/_test-code-samples.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
name: Test Code Samples
22

33
on:
4-
pull_request:
5-
schedule:
6-
- cron: '0 0 * * *'
7-
8-
# Allow running this workflow manually from the Actions tab
4+
workflow_call:
95
workflow_dispatch:
106

117
jobs:

.github/workflows/test-integration.yml renamed to .github/workflows/_test-integrations.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@
44
name: Integration Test
55

66
on:
7-
pull_request:
8-
workflow_run:
9-
workflows: ["Test Code Samples"]
10-
types:
11-
- completed
7+
workflow_call:
128

139
jobs:
1410
pytest:

.github/workflows/test-regression.yml renamed to .github/workflows/_test-regressions.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,8 @@
44
name: Regression Test
55

66
on:
7-
pull_request:
7+
workflow_call:
88
workflow_dispatch:
9-
workflow_run:
10-
workflows: ["Test Code Samples"]
11-
types:
12-
- completed
139

1410
jobs:
1511
pytest:

.github/workflows/unit-test.yml renamed to .github/workflows/_test-units.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
name: Test
55

66
on:
7-
- push
7+
workflow_call:
88

99
jobs:
1010
pytest:
11-
name: Run Tests
11+
name: Run Unit Tests
1212
timeout-minutes: 30
1313
strategy:
1414
matrix:

.github/workflows/cron.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Crontab
2+
3+
on:
4+
schedule:
5+
- cron: '33 0 * * *'
6+
7+
jobs:
8+
test_regressions:
9+
uses: mindee/mindee-api-python/.github/workflows/_test-regressions.yml@main
10+
secrets: inherit
11+
test_code_samples:
12+
uses: mindee/mindee-api-python/.github/workflows/_test-code-samples.yml@main
13+
secrets: inherit

.github/workflows/license.yml

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

.github/workflows/publish-release.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Publish Release
2+
3+
on:
4+
release:
5+
types: [ published ]
6+
7+
jobs:
8+
docs-publish:
9+
uses: mindee/mindee-api-python/.github/workflows/_docs.yml@main
10+
secrets: inherit
11+
sync-readme:
12+
uses: mindee/mindee-api-python/.github/workflows/_sync-readme.yml@main
13+
needs: docs-publish
14+
secrets: inherit
15+
maven-publish:
16+
uses: mindee/mindee-api-python/.github/workflows/_publish.yml@main
17+
secrets: inherit

.github/workflows/pull-request.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Pull Request
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
static_analysis:
8+
uses: mindee/mindee-api-python/.github/workflows/_static-analysis.yml@main
9+
test_units:
10+
uses: mindee/mindee-api-python/.github/workflows/_test-units.yml@main
11+
needs: static_analysis
12+
secrets: inherit
13+
test_regressions:
14+
uses: mindee/mindee-api-python/.github/workflows/_test-regressions.yml@main
15+
needs: test_units
16+
secrets: inherit
17+
test_integrations:
18+
uses: mindee/mindee-api-python/.github/workflows/_test-integrations.yml@main
19+
needs: test_units
20+
secrets: inherit
21+
test_code_samples:
22+
uses: mindee/mindee-api-python/.github/workflows/_test-code-samples.yml@main
23+
needs: test_units
24+
secrets: inherit
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Push Main Branch
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
lint:
10+
uses: mindee/mindee-api-python/.github/workflows/_lint.yml@main
11+
test_units:
12+
uses: mindee/mindee-api-python/.github/workflows/_test-units.yml@main
13+
needs: lint
14+
secrets: inherit
15+
tag:
16+
uses: mindee/client-lib-actions/.github/workflows/tag-version.yml@main
17+
needs: build

.github/workflows/tag-version.yml

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

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ safe_licenses = [
113113
"MIT License",
114114
"Mozilla Public License 2.0 (MPL 2.0)",
115115
"BSD License",
116-
"(Apache-2.0 OR BSD-3-Clause) AND LicenseRef-PdfiumThirdParty",
116+
"BSD-3-Clause, Apache-2.0, PdfiumThirdParty",
117117
"Historical Permission Notice and Disclaimer (HPND)",
118118
"CMU License (MIT-CMU)",
119119
]

0 commit comments

Comments
 (0)