Skip to content

Commit

Permalink
chore: improve GH workflows (#533)
Browse files Browse the repository at this point in the history
  • Loading branch information
gioboa authored Jan 9, 2024
1 parent da4e6f6 commit 4df0f00
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: PR Prettier Check

on:
pull_request_target:
types:
- opened
- edited
- synchronize
- ready_for_review

permissions:
pull-requests: read

jobs:
########### LINT PACKAGE ############
lint-package:
name: Lint Package
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- uses: pnpm/action-setup@v2.2.4

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20.10.0
cache: 'pnpm'
registry-url: https://registry.npmjs.org/

- run: corepack enable

- name: Install NPM Dependencies
run: pnpm install --frozen-lockfile

- name: Prettier Check
if: ${{ always() }}
run: pnpm fmt.check
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PR Title Checks
name: PR Title Check

on:
pull_request_target:
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@
"test.unit": "uvu -r tsm tests/unit",
"tsc.watch": "tsc -w",
"version": "npm run build.prod",
"fmt": "prettier --config package.json --write src"
"fmt": "prettier --config package.json --write src",
"fmt.check": "prettier --config package.json --check src"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.19.5",
Expand Down

1 comment on commit 4df0f00

@vercel
Copy link

@vercel vercel bot commented on 4df0f00 Jan 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.