Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prettier will only warn and fail instead of crashing #46

Merged
merged 1 commit into from
Nov 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,21 @@ jobs:
prettier:
name: Prettier
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v1
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
node-version: '14'
registry-url: 'https://registry.npmjs.org'

- run: yarn install --frozen-lockfile
- run: yarn run prettier:check

- name: Prettify code
uses: creyD/prettier_action@v3.1
- if: ${{ failure() }}
uses: unsplash/comment-on-pr@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
only_changed: True
msg: "Prettier check failed. You need to run `yarn run prettier:write` before committing."
check_for_duplicate_msg: true