Skip to content

Commit

Permalink
chore: add code checking CI
Browse files Browse the repository at this point in the history
  • Loading branch information
FriesI23 committed Jan 14, 2025
1 parent a644681 commit 0becaa8
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Check CI

on:
workflow_call:

jobs:
file-integrity:
name: Generated Files integrity checking
runs-on: ubuntu-latest
steps:
- name: Pre Steps
run: |
echo 'function git_check_changes() {
local script_path=$1
bash $script_path
if [ $? -ne 0 ]; then
echo "Script Failed with exit code $?."
exit 1
fi
CHANGES=$(git status --porcelain)
if [[ -n "$CHANGES" ]]; then
echo "Detected changes:"
echo "$CHANGES"
echo "------------------------"
echo "Details:"
git diff
exit 1
fi
}' >> $GITHUB_ENV
- uses: actions/checkout@v4
- uses: ./.github/actions/setup_flutter
- name: Normalized ARB files checking
run: |
git_check_changes "${{ github.workspace }}/scripts/normalize_arb.sh"
- name: Generated Files checking
run: |
git_check_changes "${{ github.workspace }}/scripts/build_runner.sh"
3 changes: 3 additions & 0 deletions .github/workflows/app-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ jobs:
analyzing:
uses: ./.github/workflows/_analyze.yml

checking:
uses: ./.github/workflows/_check.yml

testing:
uses: ./.github/workflows/_test.yml

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/mr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
analyzing:
uses: ./.github/workflows/_analyze.yml

checking:
uses: ./.github/workflows/_check.yml

testing:
uses: ./.github/workflows/_test.yml
with:
Expand Down

0 comments on commit 0becaa8

Please sign in to comment.