Skip to content

Commit

Permalink
Small fixes for commands (#19)
Browse files Browse the repository at this point in the history
* Small fixes for commands

* frontend_addon: Fix ci-i18n

* Fix tests

---------

Co-authored-by: Érico Andrei <[email protected]>
  • Loading branch information
sneridagh and ericof authored May 21, 2024
1 parent 612a912 commit 8de32b4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/frontend_addon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,8 @@ jobs:
with:
node-version: ${{ env.NODE_VERSION }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9
# We don't want to install until later,
# when the cache and Cypress are in place
run_install: false
- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down Expand Up @@ -110,7 +105,7 @@ jobs:
- name: Run unit tests
working-directory: frontend_addon/volto-addon
run: |
make test-ci
make ci-test
- name: Run i18n tests
working-directory: frontend_addon/volto-addon
Expand Down
6 changes: 5 additions & 1 deletion frontend_addon/{{ cookiecutter.__folder_name }}/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ build: ## Build a production bundle for distribution of the project with the add
i18n: ## Sync i18n
pnpm --filter $(ADDON_NAME) i18n

.PHONY: ci-i18n
ci-i18n: ## Check if i18n is not synced
pnpm --filter $(ADDON_NAME) i18n && git diff -G'^[^\"POT]' --exit-code

.PHONY: format
format: ## Format codebase
pnpm lint:fix
Expand All @@ -58,7 +62,7 @@ format: ## Format codebase
lint: ## Lint, or catch and remove problems, in code base
pnpm lint
pnpm prettier
pnpm stylelint
pnpm stylelint --allow-empty-input

.PHONY: release
release: ## Release the add-on on npmjs.org
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"build": "pnpm build:deps && VOLTOCONFIG=$(pwd)/volto.config.js pnpm --filter @plone/volto build",
"build:deps": "pnpm --filter @plone/registry --filter @plone/components build",
"i18n": "pnpm --filter {{ cookiecutter.npm_package_name }} i18n",
"test": "RAZZLE_JEST_CONFIG=$(pwd)/jest-addon.config.js pnpm --filter @plone/volto test",
"test": "RAZZLE_JEST_CONFIG=$(pwd)/jest-addon.config.js pnpm --filter @plone/volto test -- --passWithNoTests",
"lint": "eslint --max-warnings=0 'packages/**/src/**/*.{js,jsx,ts,tsx}'",
"lint:fix": "eslint --fix 'packages/**/src/**/*.{js,jsx,ts,tsx}'",
"prettier": "prettier --check 'packages/**/src/**/*.{js,jsx,ts,tsx}'",
Expand Down

0 comments on commit 8de32b4

Please sign in to comment.