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

chore: update format workflow to use same steps that precommit does #169

Merged
merged 3 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
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
18 changes: 12 additions & 6 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,21 @@ name: Format
on: [pull_request]

jobs:
prettier:
autocorrect:
runs-on: ubuntu-latest
# Only run on PRs from non-forks
if: github.event.pull_request.head.repo.full_name == github.repository
steps:
- name: Cloning the repository
uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Prettify the code
uses: creyD/[email protected]
- uses: actions/setup-node@v3
with:
prettier_options: '--write .'
node-version: 18
- run: yarn install --no-lockfile
- run: yarn fmt
- run: yarn lint --fix
- uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # tag=v5
with:
commit_message: ':robot: Automated formatting fixes'
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-wdio": "^8.0.14",
"husky": "^8.0.1",
"prettier": "^2.7.1",
"prettier": "^3.0.3",
"typescript": "^5.0.4"
}
}