Skip to content

Commit

Permalink
CI(pre-merge-checks): prepare for rust a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
bayandin committed Nov 13, 2024
1 parent e0e61a3 commit 9af6455
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/pre-merge-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,40 @@ jobs:
get-changed-files:
runs-on: ubuntu-22.04
outputs:
common-changed: ${{ steps.common-src.outputs.any_changed }}
python-changed: ${{ steps.python-src.outputs.any_changed }}
any-changed: |
${{ steps.common-src.outputs.any_changed == 'true' ||
steps.python-src.outputs.any_changed == 'true' }}
steps:
- uses: actions/checkout@v4

- uses: tj-actions/changed-files@4edd678ac3f81e2dc578756871e4d00c19191daf # v45.0.4
id: python-src
id: common-src
with:
files: |
.github/workflows/build-build-tools-image.yml
.github/workflows/pre-merge-checks.yml
- uses: tj-actions/changed-files@4edd678ac3f81e2dc578756871e4d00c19191daf # v45.0.4
id: python-src
with:
files: |
.github/workflows/_check-codestyle-python.yml
**/**.py
poetry.lock
pyproject.toml
- name: PRINT ALL CHANGED FILES FOR DEBUG PURPOSES
env:
COMMON_CHANGED_FILES: ${{ steps.common-src.outputs.all_changed_files }}
PYTHON_CHANGED_FILES: ${{ steps.python-src.outputs.all_changed_files }}
run: |
echo "${COMMON_CHANGED_FILES}"
echo "${PYTHON_CHANGED_FILES}"
build-build-tools-image:
if: needs.get-changed-files.outputs.python-changed == 'true'
if: needs.get-changed-files.outputs.any-changed == 'true'
needs: [ get-changed-files ]
uses: ./.github/workflows/build-build-tools-image.yml
with:
Expand All @@ -45,7 +59,9 @@ jobs:
secrets: inherit

check-codestyle-python:
if: needs.get-changed-files.outputs.python-changed == 'true'
if: |
needs.get-changed-files.outputs.python-changed == 'true' ||
needs.get-changed-files.outputs.common-changed == 'true'
needs: [ get-changed-files, build-build-tools-image ]
uses: ./.github/workflows/_check-codestyle-python.yml
with:
Expand Down

0 comments on commit 9af6455

Please sign in to comment.