Skip to content

Commit

Permalink
Replace yarn with pnpm (#2164)
Browse files Browse the repository at this point in the history
* Replace yarn with pnpm

* pnpm should be in PATH now

* setup pnpm on CI

* fix syntax

* don't add setup-node

* use corepack instead; test on fmt first

* works; replicate

* parachain-launch uses yarn; is not ours :P

* add dependencies

* resolve missing deps

* add explicit dep

* another missing dep

* one more ci job

* add dependencies

* update dependencies

* api build

---------

Co-authored-by: Verin1005 <daqingchong0809@gmail.com>
  • Loading branch information
grumpygreenguy and 0xverin authored Sep 28, 2023
1 parent c006de8 commit 8754340
Show file tree
Hide file tree
Showing 76 changed files with 18,434 additions and 14,147 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ on:
branches:
- dev
paths-ignore:
- "**/dependabot.yml"
- "**/README.md"
- '**/dependabot.yml'
- '**/README.md'
pull_request:
branches:
- dev
Expand Down Expand Up @@ -167,13 +167,16 @@ jobs:
run: |
cargo fmt --all -- --check
- name: Enable corepack and pnpm
run: corepack enable && corepack enable pnpm

- name: Tee-worker install npm deps
working-directory: ./tee-worker/ts-tests
run: corepack yarn install
run: pnpm install

- name: Tee-worker check ts code format
working-directory: ./tee-worker/ts-tests
run: corepack yarn check-format
run: pnpm run check-format

- name: Fail early
if: failure()
Expand Down Expand Up @@ -224,7 +227,7 @@ jobs:
- set-condition
- sequentialise
if: needs.set-condition.outputs.rebuild_tee == 'true'
container: "litentry/litentry-tee-dev:latest"
container: 'litentry/litentry-tee-dev:latest'
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -475,6 +478,8 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
build-contexts: local-stash=docker-image://localhost:5000/local-stash:latest
load: true
file: tee-worker/build.Dockerfile
tags: litentry/litentry-worker:latest
target: deployed-worker
Expand All @@ -484,6 +489,8 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
build-contexts: local-stash=docker-image://localhost:5000/local-stash:latest
load: true
file: tee-worker/build.Dockerfile
tags: litentry/litentry-cli:latest
target: deployed-client
Expand Down Expand Up @@ -538,6 +545,9 @@ jobs:
run: |
docker load < litentry-parachain-dev.tar.gz
- name: Enable corepack and pnpm
run: corepack enable && corepack enable pnpm

- name: Run ts tests for ${{ matrix.chain }}
if: needs.set-condition.outputs.run_parachain_test == 'true'
timeout-minutes: 30
Expand Down Expand Up @@ -686,6 +696,9 @@ jobs:
docker load < litentry-tee.tar.gz
docker images
- name: Enable corepack and pnpm
run: corepack enable && corepack enable pnpm

- name: Generate parachain artefacts
run: |
./tee-worker/scripts/litentry/generate_parachain_artefacts.sh
Expand Down Expand Up @@ -791,4 +804,4 @@ jobs:
if: needs.set-condition.outputs.rebuild_tee == 'true'
run: |
docker push litentry/litentry-worker
docker push litentry/litentry-cli
docker push litentry/litentry-cli
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

**/node_modules/

docker/yarn.lock
docker/generated-*/
tee-worker/docker/litentry/

Expand All @@ -18,6 +17,3 @@ recipe.json
gethdata

*.patch

# Docker files
docker/.yarn
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ generate-docker-compose-rococo:

.PHONY: update-ts-dep ## update ts-tests dependencies
update-ts-dep:
@cd ts-tests && npx npm-check-updates -u && corepack yarn
@cd ts-tests && pnpm dlx npm-check-updates -u && pnpm install

# format

Expand Down
1 change: 0 additions & 1 deletion docker/.yarnrc.yml

This file was deleted.

2 changes: 1 addition & 1 deletion docker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"main": "",
"license": "GPL-3.0",
"scripts": {
"build": "cd node_modules/@open-web3/parachain-launch && yarn && yarn build",
"build": "cd node_modules/@open-web3/parachain-launch && corepack yarn install && corepack yarn run build",
"start": "node_modules/.bin/parachain-launch"
},
"dependencies": {
Expand Down
Loading

0 comments on commit 8754340

Please sign in to comment.