Skip to content

Commit

Permalink
CI(pre-merge-checks): prepare for rust
Browse files Browse the repository at this point in the history
  • Loading branch information
bayandin committed Nov 11, 2024
1 parent 89d4f0b commit 3e48fdd
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions .github/workflows/pre-merge-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,42 @@ 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' || github.event_name == 'pull_request'
if: |
needs.get-changed-files.outputs.any-changed == 'true' ||
github.event_name == 'pull_request'
needs: [ get-changed-files ]
uses: ./.github/workflows/build-build-tools-image.yml
with:
Expand All @@ -52,7 +68,10 @@ jobs:
secrets: inherit

check-codestyle-python:
if: needs.get-changed-files.outputs.python-changed == 'true' || github.event_name == 'pull_request'
if: |
needs.get-changed-files.outputs.python-changed == 'true' ||
needs.get-changed-files.outputs.common-changed == 'true' ||
github.event_name == 'pull_request'
needs: [ get-changed-files, build-build-tools-image ]
uses: ./.github/workflows/_check-codestyle-python.yml
with:
Expand All @@ -65,7 +84,7 @@ jobs:
# - conclusion
# - neon-cloud-e2e
conclusion:
if: always() && github.event_name != 'pull_request'
if: always() && github.event_name == 'merge_group'
permissions:
statuses: write # for `github.repos.createCommitStatus(...)`
needs:
Expand Down

0 comments on commit 3e48fdd

Please sign in to comment.