Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workflow: add code quality #44

Merged
merged 3 commits into from
Sep 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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