Skip to content
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
1 change: 0 additions & 1 deletion .github/workflows/demo-strapi-version-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,3 @@ jobs:
labels: |
dependencies
automated

46 changes: 46 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,52 @@ jobs:
with:
node-version: ${{ matrix.node }}

lint:
name: 'Check linting'
needs: [cache-and-install]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9.1.0
run_install: true

- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: 20
cache: 'pnpm'

- name: Lint
run: pnpm run lint

format:
name: 'Check formatting'
needs: [cache-and-install]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9.1.0
run_install: true

- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: 20
cache: 'pnpm'

- name: Format check
run: pnpm run format:check

build:
name: 'build (node: ${{ matrix.node }})'
needs: [cache-and-install]
Expand Down
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
npx --no-install lint-staged
pnpm run format:check
pnpm run ts:check
pnpm run test:coverage
2 changes: 1 addition & 1 deletion .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"{src,tests}/**/*.{js,ts,jsx,tsx,yml,yaml}": ["pnpm run prettier:write", "pnpm run lint:fix"]
"{src,tests}/**/*.{js,ts,jsx,tsx,yml,yaml}": ["pnpm run format:write", "pnpm run lint:fix"]
}
2 changes: 1 addition & 1 deletion demo/.strapi-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
"strapi": {
"uuid": "getstarted"
}
}
}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@
"lint:fix": "eslint . --fix",
"lint:fix:dry": "eslint . --fix-dry-run",
"prepare": "husky",
"prettier:check": "prettier --check .",
"prettier:write": "prettier --write .",
"format": "prettier --write .",
"format:write": "prettier --write .",
"format:check": "prettier --check .",
"test": "vitest run",
"test:coverage": "vitest run --coverage",
"ts:check": "tsc -p tsconfig.build.json --noEmit",
Expand Down