Last active
May 21, 2021 06:43
-
-
Save sjurgis/701ea16c08abf7fa743a6162539d94e9 to your computer and use it in GitHub Desktop.
apex-prettier Github Action
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: apex pretify | |
on: | |
push: | |
paths: | |
- 'myns/main/core/classes/**' | |
- 'myns/main/default/classes/**' | |
- 'myns/main/services/classes/**' | |
- 'myns/main/services/classes/tests/**' | |
- 'myns/tests/classes/**' | |
jobs: | |
pretify: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: bahmutov/npm-install@v1 | |
with: | |
useLockFile: true | |
- run: npm run apex-prettier | |
- uses: stefanzweifel/[email protected] | |
with: | |
commit_message: Apply apex-prettier changes | |
BEGIN PACKAGE.JSON FILE | |
{ | |
"scripts": { | |
"apex-prettier": "start-apex-server & npx wait-on http://localhost:2117/api/ast/ && prettier --write 'myns/**/*.{trigger,cls}' --tab-width 4 --print-width 100 --apex-standalone-parser built-in && stop-apex-server" | |
}, | |
"devDependencies": { | |
"prettier": "^2.0.5", | |
"prettier-plugin-apex": "^1.3.0", | |
"wait-on": "^5.0.1" | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment