Skip to content

Commit

Permalink
chore: lint test (#10)
Browse files Browse the repository at this point in the history
* chore: lint test

* fix: linting

* chore: Run checks on PR head
  • Loading branch information
clockworkgr authored Jan 30, 2024
1 parent 39bf32b commit 5db8f71
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
name: Linting

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


jobs:
lint:
name: Lint
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: pnpm/action-setup@v2
with:
version: 8
Expand All @@ -22,7 +27,9 @@ jobs:
- name: Install dependencies
run: pnpm install
- name: Run eslint on changed files
uses: reviewdog/action-eslint@v1
uses: tj-actions/eslint-changed-files@v23
with:
reporter: github-pr-check
eslint_flags: " -c .eslintrc.js './src/**/*.ts' --max-warnings=0 --ignore-path .gitignore"
config_path: ".eslintrc.js"
ignore_path: ".gitignore"
file_extensions: './src/**/*.ts'
extra_args: "--max-warnings=0"
2 changes: 2 additions & 0 deletions .github/workflows/test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: pnpm/action-setup@v2
with:
version: 8
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test-vitest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ jobs:
name: Unit tests
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: pnpm/action-setup@v2
with:
version: 8
Expand Down
2 changes: 1 addition & 1 deletion src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ export function toHexString(byteArray: ArrayLike<number>) {
.call(byteArray, function (byte) {
return ("0" + (byte & 0xff).toString(16)).slice(-2);
})
.join("");
.join("");
}

0 comments on commit 5db8f71

Please sign in to comment.