Skip to content

♻️ harmonize github actions #299

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 1 addition & 4 deletions .github/workflows/docs.yml → .github/workflows/_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
name: Publish Documentation

on:
release:
types: [ published ]

# Allows running this workflow manually from the Actions tab
workflow_call:
workflow_dispatch:

jobs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
name: Publish

on:
release:
types: [ published ]

# Allows running this workflow manually from the Actions tab
workflow_call:
workflow_dispatch:

jobs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
name: Static Analysis

on:
- push
workflow_call:

jobs:
static-check:
Expand All @@ -30,9 +30,17 @@ jobs:
${{ runner.os }}-lint-

- name: Install dependencies
# We install the full dev requirements to make sure everything installs OK
run: |
python -m pip install pip
pip install pylic~=3.6.1
pip install -e .

- name: License check
run: |
pylic check --allow-extra-safe-licenses

- name: Install lint dependencies
run: |
pip install -e .[lint]

- name: Cache pre-commit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
name: Sync `documentation` directory to ReadMe

# Run workflow for every push to the `main` branch
on:
workflow_call:
workflow_dispatch:
release:
branches:
- main

jobs:
sync:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
name: Test Code Samples

on:
pull_request:
schedule:
- cron: '0 0 * * *'

# Allow running this workflow manually from the Actions tab
workflow_call:
workflow_dispatch:

jobs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
name: Integration Test

on:
pull_request:
workflow_run:
workflows: ["Test Code Samples"]
types:
- completed
workflow_call:

jobs:
pytest:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@
name: Regression Test

on:
pull_request:
workflow_call:
workflow_dispatch:
workflow_run:
workflows: ["Test Code Samples"]
types:
- completed

jobs:
pytest:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
name: Test

on:
- push
workflow_call:

jobs:
pytest:
name: Run Tests
name: Run Unit Tests
timeout-minutes: 30
strategy:
matrix:
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Crontab

on:
schedule:
- cron: '33 0 * * *'

jobs:
test_regressions:
uses: mindee/mindee-api-python/.github/workflows/_test-regressions.yml@main
secrets: inherit
test_code_samples:
uses: mindee/mindee-api-python/.github/workflows/_test-code-samples.yml@main
secrets: inherit
41 changes: 0 additions & 41 deletions .github/workflows/license.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Publish Release

on:
release:
types: [ published ]

jobs:
docs-publish:
uses: mindee/mindee-api-python/.github/workflows/_docs.yml@main
secrets: inherit
sync-readme:
uses: mindee/mindee-api-python/.github/workflows/_sync-readme.yml@main
needs: docs-publish
secrets: inherit
maven-publish:
uses: mindee/mindee-api-python/.github/workflows/_publish.yml@main
secrets: inherit
24 changes: 24 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Pull Request

on:
pull_request:

jobs:
static_analysis:
uses: mindee/mindee-api-python/.github/workflows/_static-analysis.yml@main
test_units:
uses: mindee/mindee-api-python/.github/workflows/_test-units.yml@main
needs: static_analysis
secrets: inherit
test_regressions:
uses: mindee/mindee-api-python/.github/workflows/_test-regressions.yml@main
needs: test_units
secrets: inherit
test_integrations:
uses: mindee/mindee-api-python/.github/workflows/_test-integrations.yml@main
needs: test_units
secrets: inherit
test_code_samples:
uses: mindee/mindee-api-python/.github/workflows/_test-code-samples.yml@main
needs: test_units
secrets: inherit
17 changes: 17 additions & 0 deletions .github/workflows/push-main-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Push Main Branch

on:
push:
branches:
- main

jobs:
lint:
uses: mindee/mindee-api-python/.github/workflows/_lint.yml@main
test_units:
uses: mindee/mindee-api-python/.github/workflows/_test-units.yml@main
needs: lint
secrets: inherit
tag:
uses: mindee/client-lib-actions/.github/workflows/tag-version.yml@main
needs: build
10 changes: 0 additions & 10 deletions .github/workflows/tag-version.yml

This file was deleted.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ safe_licenses = [
"MIT License",
"Mozilla Public License 2.0 (MPL 2.0)",
"BSD License",
"(Apache-2.0 OR BSD-3-Clause) AND LicenseRef-PdfiumThirdParty",
"BSD-3-Clause, Apache-2.0, PdfiumThirdParty",
"Historical Permission Notice and Disclaimer (HPND)",
"CMU License (MIT-CMU)",
]
Expand Down
Loading