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

chore: move yarn to pnpm #2459

Closed
wants to merge 3 commits into from
Closed
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
10 changes: 5 additions & 5 deletions .github/workflows/frontend-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 14.x
cache: 'yarn'
cache-dependency-path: web/yarn.lock
cache: 'pnpm'
cache-dependency-path: web/pnpm-lock.yaml

- name: Setup golang environment
uses: actions/setup-go@v3
Expand Down Expand Up @@ -78,15 +78,15 @@ jobs:
cypress-${{ runner.os }}-cypress-cache0

- name: Install dependencies
run: yarn
run: pnpm install

- name: Start frontend then test
run: |
rm -rf cypress/integration/plugin
yarn test:e2e
pnpm test:e2e

- name: Report e2e coverage
run: npx nyc report --reporter=text-summary
run: pnpx nyc report --reporter=text-summary

- name: Upload coverage to Codecov
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/frontend-plugin-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 14.x
cache: 'yarn'
cache-dependency-path: web/yarn.lock
cache: 'pnpm'
cache-dependency-path: web/pnpm-lock.yaml

- name: Setup golang environment
uses: actions/setup-go@v3
Expand Down Expand Up @@ -80,10 +80,10 @@ jobs:
cypress-${{ runner.os }}-cypress-cache0

- name: Install dependencies
run: yarn
run: pnpm install

- name: Start frontend then test
run: yarn test-plugin:e2e
run: pnpm test-plugin:e2e

- name: Archive code coverage results
uses: actions/upload-artifact@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/make-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 14.x
cache: 'yarn'
cache-dependency-path: web/yarn.lock
cache: 'pnpm'
cache-dependency-path: web/pnpm-lock.yaml

- name: Setup golang environment
uses: actions/setup-go@v3
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test-frontend-multiple-node-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
node-version: [12.x, 14.x, 16.x]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand All @@ -37,18 +37,18 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
cache-dependency-path: web/yarn.lock
cache: 'pnpm'
cache-dependency-path: web/pnpm-lock.yaml

# Install dependencies
- name: Install dependencies
working-directory: web
run: CYPRESS_INSTALL_BINARY=0 yarn
run: CYPRESS_INSTALL_BINARY=0 pnpm

- name: Lint
working-directory: web
run: yarn run lint:js && yarn run lint:style
run: pnpm lint:js && pnpm lint:style

- name: Build the Dashboard
working-directory: web
run: yarn build
run: pnpm build
19 changes: 12 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
SHELL := /bin/bash -o pipefail
UNAME ?= $(shell uname)
YARN_EXEC ?= $(shell which yarn)
PNPM_EXEC ?= $(shell which pnpm)
GO_EXEC ?= $(shell which go)

VERSION ?= latest
VERSION ?= 2.13.0
RELEASE_SRC = apache-apisix-dashboard-${VERSION}-src

export GO111MODULE=on
Expand All @@ -36,13 +37,13 @@ help:
### build: Build the Apache APISIX Dashboard, including web and manager-api
.PHONY: build
build: web-default api-default
api/build.sh && cd ./web && export CYPRESS_INSTALL_BINARY=0 && yarn install --ignore-scripts && yarn build && mkdir -p ../output/logs
api/build.sh && cd ./web && export CYPRESS_INSTALL_BINARY=0 && pnpm install && pnpm build && mkdir -p ../output/logs


.PHONY: web-default
web-default:
ifeq ("$(wildcard $(YARN_EXEC))", "")
@echo "ERROR: Need to install yarn first"
ifeq ("$(wildcard $(PNPM_EXEC))", "")
@echo "ERROR: Need to install pnpm first"
exit 1
endif

Expand Down Expand Up @@ -121,12 +122,16 @@ release-src:
--exclude release \
--exclude api/internal/core/store/validate_mock.go \
--exclude api/internal/core/storage/storage_mock.go \
.
./api \
./licenses \
./web \
LICENSE \
Makefile \
NOTICE \
*.md

gpg --batch --yes --armor --detach-sig $(RELEASE_SRC).tgz
shasum -a 512 $(RELEASE_SRC).tgz > $(RELEASE_SRC).tgz.sha512

mkdir -p release
mv $(RELEASE_SRC).tgz release/$(RELEASE_SRC).tgz
mv $(RELEASE_SRC).tgz.asc release/$(RELEASE_SRC).tgz.asc
mv $(RELEASE_SRC).tgz.sha512 release/$(RELEASE_SRC).tgz.sha512
2 changes: 1 addition & 1 deletion web/.husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
. "$(dirname "$0")/_/husky.sh"

cd web
yarn lint-staged
pnpm lint-staged
Loading