chore(deps): lock file maintenance (v2) #223
Workflow file for this run
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: check.yml | |
on: | |
push: | |
branches: | |
- v2 | |
pull_request: | |
branches: | |
- v2 | |
jobs: | |
prettier: | |
runs-on: ubuntu-latest | |
name: 🍱 Prettier | |
steps: | |
- name: 📥️ checkout | |
uses: actions/checkout@v4 | |
- name: 🎛️ setup | |
uses: ./.github/actions/setup | |
- name: 🍱 run prettier | |
run: yarn prettier:write | |
- name: 🔢 count changes | |
run: echo "CHANGES_COUNT=$(git status -s | wc -l)" >> $GITHUB_ENV | |
- name: ✅ approve prettier result | |
if: ${{ env.CHANGES_COUNT == 0 }} | |
run: | | |
echo "# ✅ Prettier approves code" >> $GITHUB_STEP_SUMMARY | |
echo "Running prettier on $(echo ${{ github.sha }} | head -c 7) did not result in any changes. 🎉" >> $GITHUB_STEP_SUMMARY | |
- name: 🖨️ print diff introduced by prettier | |
if: ${{ env.CHANGES_COUNT > 0 }} | |
run: git diff | |
- name: ⚠️ warn over prettier result | |
if: ${{ env.CHANGES_COUNT > 0 }} | |
run: | | |
echo "# ⚠️ Prettier changed some code" >> $GITHUB_STEP_SUMMARY | |
echo "There were a total of **${{ env.CHANGES_COUNT }}** files affected by running prettier on $(echo ${{ github.sha }} | head -c 7):" >> $GITHUB_STEP_SUMMARY | |
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY | |
git diff --compact-summary >> $GITHUB_STEP_SUMMARY | |
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY | |
echo "For a complete diff introduced by prettier, please see the workflow logs." >> $GITHUB_STEP_SUMMARY | |
eslint: | |
runs-on: ubuntu-latest | |
name: 🚨 ESLint | |
steps: | |
- name: 📥️ checkout | |
uses: actions/checkout@v4 | |
- name: 🎛️ setup | |
uses: ./.github/actions/setup | |
- name: 🚨 run eslint | |
run: yarn lint:fix -o .eslint-report.json --format json | |
continue-on-error: true | |
- name: 🖨 create annotations | |
uses: ataylorme/eslint-annotate-action@v3 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
report-json: .eslint-report.json | |
only-pr-files: true | |
fail-on-warning: false | |
fail-on-error: true | |
check-name: ESLint Report Analysis | |
markdown-report-on-step-summary: true |