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

feat: use adf version of pnpm #1813

Merged
merged 5 commits into from
Feb 7, 2025
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
5 changes: 5 additions & 0 deletions .changeset/lucky-pets-brake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"fuels-wallet": patch
---

feat: use adf version of pnpm
13 changes: 10 additions & 3 deletions .github/workflows/pr-tests-e2e-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,17 @@ jobs:
timeout-minutes: 10
steps:
- uses: actions/checkout@v4

- name: Extract pnpm version from .tool-versions
id: get_pnpm
run: |
PNPM_VERSION=$(grep '^pnpm' .tool-versions | awk '{print $2}')
echo "PNPM_VERSION=${PNPM_VERSION}" >> $GITHUB_ENV

- uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.11.0
pnpm-version: 9.5.0
pnpm-version: ${{ env.PNPM_VERSION }}

- uses: ./.github/actions/setup-playwright

Expand All @@ -28,11 +35,11 @@ jobs:
timeout-minutes: 15
env:
NODE_ENV: test
READONLY_TESTNET_ASSETS_VIEW: ${{secrets.READONLY_TESTNET_ASSETS_VIEW}}
READONLY_TESTNET_ASSETS_VIEW: ${{ secrets.READONLY_TESTNET_ASSETS_VIEW }}

- name: Upload Test Report
if: failure()
uses: actions/upload-artifact@v4
with:
name: e2e-test-report
path: packages/e2e-assets/playwright-html
path: packages/e2e-assets/playwright-html
30 changes: 18 additions & 12 deletions .github/workflows/pr-tests-e2e-contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,23 @@ concurrency:
jobs:
tests-e2e-contracts:
name: Test (Chrome Stable) [Shard ${{ matrix.shard }}]
runs-on: buildjet-8vcpu-ubuntu-2204
runs-on: buildjet-8vcpu-ubuntu-2204
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v4
- name: Extract pnpm version from .tool-versions
id: get_pnpm
run: |
PNPM_VERSION=$(grep '^pnpm' .tool-versions | awk '{print $2}')
echo "PNPM_VERSION=${PNPM_VERSION}" >> $GITHUB_ENV
- uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.11.0
pnpm-version: 9.5.0
pnpm-version: ${{ env.PNPM_VERSION }}
- uses: FuelLabs/github-actions/setups/docker@master
with:
username: ${{ github.repository_owner }}
Expand All @@ -32,8 +37,7 @@ jobs:

- name: Run PNPM install
id: pnpm-cache
run:
pnpm recursive install --frozen-lockfile
run: pnpm recursive install --frozen-lockfile

- name: Start Test Node
run: pnpm node:up
Expand All @@ -50,7 +54,7 @@ jobs:
providerUrl: "http://localhost:4000/v1/graphql"
masterMnemonic: ${{ secrets.VITE_MASTER_WALLET_MNEMONIC }}
genesisSecret: "0xa449b1ffee0e2205fa924c6740cc48b3b473aa28587df6dab12abc245d1f5298"
browser: 'chromium'
browser: "chromium"
shard: ${{ matrix.shard }}/4

- uses: actions/upload-artifact@v4
Expand All @@ -62,7 +66,7 @@ jobs:

tests-e2e-contracts-beta:
name: Test (Chrome Beta) [Shard ${{ matrix.shard }}]
runs-on: buildjet-8vcpu-ubuntu-2204
runs-on: buildjet-8vcpu-ubuntu-2204
timeout-minutes: 20
continue-on-error: true
strategy:
Expand All @@ -71,10 +75,15 @@ jobs:
shard: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v4
- name: Extract pnpm version from .tool-versions
id: get_pnpm
run: |
PNPM_VERSION=$(grep '^pnpm' .tool-versions | awk '{print $2}')
echo "PNPM_VERSION=${PNPM_VERSION}" >> $GITHUB_ENV
- uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.11.0
pnpm-version: 9.5.0
pnpm-version: ${{ env.PNPM_VERSION }}

- uses: FuelLabs/github-actions/setups/docker@master
with:
Expand All @@ -84,8 +93,7 @@ jobs:

- name: Run PNPM install
id: pnpm-cache
run:
pnpm recursive install --frozen-lockfile
run: pnpm recursive install --frozen-lockfile

- name: Start Test Node
run: pnpm node:up
Expand All @@ -102,7 +110,7 @@ jobs:
providerUrl: "http://localhost:4000/v1/graphql"
masterMnemonic: ${{ secrets.VITE_MASTER_WALLET_MNEMONIC }}
genesisSecret: "0xa449b1ffee0e2205fa924c6740cc48b3b473aa28587df6dab12abc245d1f5298"
browser: 'chrome-beta'
browser: "chrome-beta"
shard: ${{ matrix.shard }}/4

- uses: actions/upload-artifact@v4
Expand All @@ -111,5 +119,3 @@ jobs:
name: playwright-e2e-contract-tests-report-beta-shard-${{ matrix.shard }}
path: packages/e2e-contract-tests/playwright-results
retention-days: 30


9 changes: 7 additions & 2 deletions .github/workflows/pr-tests-e2e-crx-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,23 @@ jobs:
timeout-minutes: 7
steps:
- uses: actions/checkout@v4
- name: Extract pnpm version from .tool-versions
id: get_pnpm
run: |
PNPM_VERSION=$(grep '^pnpm' .tool-versions | awk '{print $2}')
echo "PNPM_VERSION=${PNPM_VERSION}" >> $GITHUB_ENV
- uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.11.0
pnpm-version: 9.5.0
pnpm-version: ${{ env.PNPM_VERSION }}
- uses: FuelLabs/github-actions/setups/docker@master
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Start Test Node
run: pnpm node:up

- name: Generate .env
run: cp packages/app/.env.example packages/app/.env

Expand Down
20 changes: 15 additions & 5 deletions .github/workflows/pr-tests-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,23 @@ jobs:
runs-on: buildjet-8vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v4
- name: Extract pnpm version from .tool-versions
id: get_pnpm
run: |
PNPM_VERSION=$(grep '^pnpm' .tool-versions | awk '{print $2}')
echo "PNPM_VERSION=${PNPM_VERSION}" >> $GITHUB_ENV
- uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.11.0
pnpm-version: 9.5.0
pnpm-version: ${{ env.PNPM_VERSION }}
- uses: FuelLabs/github-actions/setups/docker@master
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Start Test Node
run: pnpm node:up

- name: Generate .env
run: cp packages/app/.env.example packages/app/.env

Expand Down Expand Up @@ -56,18 +61,23 @@ jobs:
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: Extract pnpm version from .tool-versions
id: get_pnpm
run: |
PNPM_VERSION=$(grep '^pnpm' .tool-versions | awk '{print $2}')
echo "PNPM_VERSION=${PNPM_VERSION}" >> $GITHUB_ENV
- uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.11.0
pnpm-version: 9.5.0
pnpm-version: ${{ env.PNPM_VERSION }}
- uses: FuelLabs/github-actions/setups/docker@master
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Start Test Node
run: pnpm node:up

- name: Generate .env
run: cp packages/app/.env.example packages/app/.env

Expand All @@ -80,7 +90,7 @@ jobs:

- uses: ./.github/actions/setup-playwright
with:
browser: 'chrome-beta'
browser: "chrome-beta"

- name: Run E2E Tests
run: xvfb-run --auto-servernum -- pnpm test:e2e:beta
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/pr-tests-jest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@ jobs:
shard: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v4
- name: Extract pnpm version from .tool-versions
id: get_pnpm
run: |
PNPM_VERSION=$(grep '^pnpm' .tool-versions | awk '{print $2}')
echo "PNPM_VERSION=${PNPM_VERSION}" >> $GITHUB_ENV
- uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.11.0
pnpm-version: 9.5.0
pnpm-version: ${{ env.PNPM_VERSION }}
- uses: FuelLabs/github-actions/setups/docker@master
with:
username: ${{ github.repository_owner }}
Expand Down
46 changes: 34 additions & 12 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: tj-actions/changed-files@v22.2
with:
files: |
**/packages/app/**
**/packages/app/**
**/packages/types/**
**/packages/react/**

Expand All @@ -44,11 +44,17 @@ jobs:
with:
fetch-depth: 0

- name: Extract pnpm version from .tool-versions
id: get_pnpm
run: |
PNPM_VERSION=$(grep '^pnpm' .tool-versions | awk '{print $2}')
echo "PNPM_VERSION=${PNPM_VERSION}" >> $GITHUB_ENV

- name: CI Setup
uses: FuelLabs/github-actions/setups/node@58bcd91d7246e40938e1971be0b0fe35b253dff0
with:
node-version: 20.11.0
pnpm-version: 9.5.0
pnpm-version: ${{ env.PNPM_VERSION }}

- name: Validate Changeset
run: pnpm changeset status --since=origin/${{ github.base_ref }}
Expand All @@ -58,16 +64,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Extract pnpm version from .tool-versions
id: get_pnpm
run: |
PNPM_VERSION=$(grep '^pnpm' .tool-versions | awk '{print $2}')
echo "PNPM_VERSION=${PNPM_VERSION}" >> $GITHUB_ENV
- uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.11.0
pnpm-version: 9.5.0
pnpm-version: ${{ env.PNPM_VERSION }}
- name: Install jq
run: sudo apt-get install jq
- run: |
pnpm audit --prod --json | jq '
.advisories | to_entries |
map(select(.value.patched_versions != "<0.0.0" and .value.severity == "critical") | {package: .value.module_name, vulnerable: .value.vulnerable_versions, fixed_in: .value.patched_versions})
.advisories | to_entries |
map(select(.value.patched_versions != "<0.0.0" and .value.severity == "critical") | {package: .value.module_name, vulnerable: .value.vulnerable_versions, fixed_in: .value.patched_versions})
' > audit_fix_packages.json
if [ "$(jq 'length' audit_fix_packages.json)" -gt "0" ]; then
echo "Actionable vulnerabilities found in the following packages:"
Expand All @@ -78,16 +89,21 @@ jobs:
echo "No actionable vulnerabilities"
exit 0
fi

strict-audit:
name: Strict Audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Extract pnpm version from .tool-versions
id: get_pnpm
run: |
PNPM_VERSION=$(grep '^pnpm' .tool-versions | awk '{print $2}')
echo "PNPM_VERSION=${PNPM_VERSION}" >> $GITHUB_ENV
- uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.11.0
pnpm-version: 9.5.0
pnpm-version: ${{ env.PNPM_VERSION }}
- run: pnpm audit --prod

lint:
Expand All @@ -101,21 +117,27 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Extract pnpm version from .tool-versions
id: get_pnpm
run: |
PNPM_VERSION=$(grep '^pnpm' .tool-versions | awk '{print $2}')
echo "PNPM_VERSION=${PNPM_VERSION}" >> $GITHUB_ENV

- name: Setup Node
uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.11.0
pnpm-version: 9.5.0
pnpm-version: ${{ env.PNPM_VERSION }}

- name: Run lint
run: |
pnpm ts:check
pnpm lint:ci

docs:
name: Docs
uses: FuelLabs/github-actions/.github/workflows/next-docs.yml@master
with:
doc-folder-path: 'packages/docs/docs'
src-folder-path: 'packages/docs/src'
spellcheck-config-path: 'packages/docs/.spellcheck.yml'
doc-folder-path: "packages/docs/docs"
src-folder-path: "packages/docs/src"
spellcheck-config-path: "packages/docs/.spellcheck.yml"
7 changes: 6 additions & 1 deletion .github/workflows/release-npm-changeset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,15 @@ jobs:
# workaround to ensure force pushes to changeset branch use REPO_TOKEN owner's account
# see https://github.com/changesets/action/issues/70
persist-credentials: false
- name: Extract pnpm version from .tool-versions
id: get_pnpm
run: |
PNPM_VERSION=$(grep '^pnpm' .tool-versions | awk '{print $2}')
echo "PNPM_VERSION=${PNPM_VERSION}" >> $GITHUB_ENV
- uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.11.0
pnpm-version: 9.5.0
pnpm-version: ${{ env.PNPM_VERSION }}
- uses: FuelLabs/github-actions/setups/npm@master
with:
npm-token: ${{ secrets.NPM_TOKEN_WALLET }}
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/tests-devnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,23 @@ jobs:
runs-on: buildjet-4vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v4
- name: Extract pnpm version from .tool-versions
id: get_pnpm
run: |
PNPM_VERSION=$(grep '^pnpm' .tool-versions | awk '{print $2}')
echo "PNPM_VERSION=${PNPM_VERSION}" >> $GITHUB_ENV
- uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.11.0
pnpm-version: 9.5.0
pnpm-version: ${{ env.PNPM_VERSION }}
- uses: FuelLabs/github-actions/setups/docker@master
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Run PNPM install
id: pnpm-cache
run:
pnpm recursive install --frozen-lockfile
run: pnpm recursive install --frozen-lockfile

- name: Generate .env app
run: cp packages/app/.env.example packages/app/.env
Expand Down
Loading
Loading