Skip to content

Commit

Permalink
workflow: add code quality (#44)
Browse files Browse the repository at this point in the history
* workflow: add code quality (#2)

* test eslint

* update

* update

* test

* update

* update

* update

* Revert "test"

This reverts commit 7ee9326.

* update

* Revert "update"

This reverts commit 594f111.
  • Loading branch information
PPpro authored Sep 9, 2023
1 parent 142574b commit de5666d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/code-quality.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: code-quality
run-name: ${{ github.actor }} - code-quality
on: [pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.17.0'

- name: Build all modules
run: npm ci

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v39
with:
files: '**/*.ts'

- name: Lint all changed files
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo "linting file: $file"
npx eslint $file
done
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"scripts": {
"postinstall": "npm run build",
"build": "tsc && turbo build",
"change": "node ./scripts/remove-workspaces.js && changeset add && node ./scripts/restore-workspaces.js",
"version": "node ./scripts/remove-workspaces.js && changeset version && node ./scripts/restore-workspaces.js",
Expand Down

0 comments on commit de5666d

Please sign in to comment.