1
0
Fork 1
mirror of https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git synced 2025-07-12 19:09:56 +03:00

CI: Only run most pipelines when they actually are necessary

Plus, add pmbootstrap.py as a condition for integration tests.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2617
This commit is contained in:
Newbyte 2025-06-04 10:28:28 +02:00
parent c9674c4455
commit 4dd820756f
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -71,16 +71,40 @@ pytest-python3.10:
ruff: ruff:
stage: test stage: test
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
changes:
- .ci/ruff.sh
- .gitlab-ci.yml
- "pmb/**/*.py"
- "test/**/*.py"
- pmbootstrap.py
- pyproject.toml
script: script:
- ".ci/ruff.sh" - ".ci/ruff.sh"
shellcheck: shellcheck:
stage: test stage: test
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
changes:
- "**/*.sh"
- .ci/shellcheck.sh
- .gitlab-ci.yml
- .shellcheckrc
script: script:
- ".ci/shellcheck.sh" - ".ci/shellcheck.sh"
vermin: vermin:
stage: test stage: test
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
changes:
- .ci/vermin.sh
- .gitlab-ci.yml
- "pmb/**/*.py"
- "test/**/*.py"
- pmbootstrap.py
script: script:
- ".ci/vermin.sh" - ".ci/vermin.sh"
@ -97,6 +121,15 @@ mr-settings:
mypy: mypy:
stage: test stage: test
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
changes:
# We don't run mypy on tests, so no need to include test/**/*.py here.
- .ci/mypy.sh
- .gitlab-ci.yml
- "pmb/**/*.py"
- pmbootstrap.py
- pyproject.toml
script: script:
- ".ci/mypy.sh" - ".ci/mypy.sh"
@ -105,6 +138,12 @@ docs:
# py3-sphinx >= 7.3 is needed for --fail-on-warning # py3-sphinx >= 7.3 is needed for --fail-on-warning
# alpine:3.20 is on py3-sphinx 7.2.x # alpine:3.20 is on py3-sphinx 7.2.x
image: alpine:edge image: alpine:edge
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
changes:
- .ci/docs.sh
- .gitlab-ci.yml
- "pmb/**/*.py"
script: script:
- ".ci/docs.sh" - ".ci/docs.sh"
artifacts: artifacts:
@ -134,6 +173,7 @@ deploy:
- ".ci/integration_tests/**/*" - ".ci/integration_tests/**/*"
- "helpers/**/*" - "helpers/**/*"
- "pmb/**/*" - "pmb/**/*"
- pmbootstrap.py
- .ci/integration.sh - .ci/integration.sh
- .gitlab-ci.yml - .gitlab-ci.yml
before_script: before_script: