Skip to content

Commit

Permalink
Check formating in CI
Browse files Browse the repository at this point in the history
We add a step check-format in the main ci file to check the typescript format.
We add the steps directly in generate-and-build for the python side with the generator test
  • Loading branch information
greenscientist committed Dec 17, 2024
1 parent e462230 commit f5529ed
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/evolution-generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ jobs:
run: yarn generateSurvey:example
- name: Install
run: yarn
- name: Format python
run: yarn format:python
- name: Check git status after python format
run: |
if [[ -n "$(git status --porcelain)" ]]; then
echo "Code formatting issues found. Please run 'yarn format' locally and commit changes."
git status
git diff
exit 1
fi
- name: Compile Evolution
run: yarn compile
- name: Compile Generated survey
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/evolution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,24 @@ jobs:
run: yarn compile
- name: Lint
run: yarn lint

check-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use latest Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
- name: Install
run: yarn install --frozen-lockfile
- name: Yarn format
run: yarn format
- name: Check git status
run: |
if [[ -n "$(git status --porcelain)" ]]; then
echo "Code formatting issues found. Please run 'yarn format' locally and commit changes."
git status
git diff
exit 1
fi

0 comments on commit f5529ed

Please sign in to comment.