Skip to content

Commit

Permalink
Merge pull request #3722 from SuperITMan/feature/gh-workflow-add-pret…
Browse files Browse the repository at this point in the history
…tier-check
  • Loading branch information
SuperITMan authored Feb 7, 2024
2 parents 7b35373 + a21f9e7 commit 3defd41
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ jobs:
# See: https://github.com/marketplace/actions/checkout
- uses: actions/checkout@v2
with:
fetch-depth: |
if [[ '${{ github.event_name != 'pull_request' }}' ]]; then
1
else
git rev-list --count ${{ github.event.pull_request.base.sha }}..HEAD
fi
# See: https://github.com/marketplace/actions/setup-node-js-environment
- name: Use Node.js ${{ matrix.node_version }}
Expand Down Expand Up @@ -101,6 +108,11 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Prettier check
run: |
npx prettier $(git diff-tree --no-commit-id --name-only --stat --diff-filter=ACM -r ${{ github.event.pull_request.base.sha }} HEAD) --check
if: github.event_name == 'pull_request'

- name: Build packages
run: npm run build:trace

Expand Down
8 changes: 8 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ dist/
coverage/
reports/
node_modules/
.dockerignore
.editorconfig
.gitattributes
.gitignore
.nvmrc
.npmrc
.prettierignore
*.sh
CHANGELOG.md
package.json
package-lock.json

0 comments on commit 3defd41

Please sign in to comment.