Feat: Local Integrations #205
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Prettier Check | |
on: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
check-formatting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "20.x" | |
- run: npm ci | |
- name: Check formatting | |
id: check_format | |
run: | | |
npm run check || STATUS=$? || true | |
echo "format_status=$STATUS" >> $GITHUB_OUTPUT | |
- name: Evaluate formatting | |
if: always() # Ensures this step always runs, regardless of the previous step's status. | |
run: | | |
echo "FORMAT_STATUS='$FORMAT_STATUS'" | |
if [ $FORMAT_STATUS -ne 0 ]; then | |
echo '❌ Changes not properly formatted, did you forget to run `npm run format` ?' | |
echo '❌ Changes not properly formatted, did you forget to run `npm run format` ?' >> $GITHUB_STEP_SUMMARY | |
exit 1 | |
else | |
echo '✅ Changes are properly formatted.' | |
fi | |
env: | |
FORMAT_STATUS: ${{ steps.check_format.outputs.format_status }} |