Skip to content

Commit

Permalink
chore: Use the same version of node for CI and local dev (#1529)
Browse files Browse the repository at this point in the history
  • Loading branch information
carleeto authored Feb 26, 2024
1 parent 53eb8dc commit 3c58e0e
Show file tree
Hide file tree
Showing 10 changed files with 99 additions and 90 deletions.
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true

# https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties

[*.{yml,yaml}]
indent_style = space
indent_size = 2
quote_type = double
2 changes: 1 addition & 1 deletion .github/workflows/build-lint-typecheck-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: lts/*
node-version-file: .nvmrc
registry-url: https://registry.npmjs.org/
cache: "yarn"

Expand Down
56 changes: 28 additions & 28 deletions .github/workflows/functional-tests-imx.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
name: Functional Tests (IMX)
on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: .nvmrc

- name: Install root dependencies
run: npm install -g yarn && yarn install --immutable
- name: Install root dependencies
run: npm install -g yarn && yarn install --immutable

- name: Build SDK
run: yarn build
- name: Build SDK
run: yarn build

- name: Install functional tests dependencies
run: cd tests/func-tests/imx && yarn install --no-immutable
- name: Install functional tests dependencies
run: cd tests/func-tests/imx && yarn install --no-immutable

- name: Run tests
env:
NETWORK: sepolia
TEST_ALCHEMY_API_KEY: ${{ secrets.TEST_ALCHEMY_API_KEY }}
PUBLIC_API_URL: 'https://api.sandbox.x.immutable.com/v1'
TEST_STARK_CONTRACT_ADDRESS: '0x2d5C349fD8464DA06a3f90b4B0E9195F3d1b7F98'
TEST_REGISTRATION_CONTRACT_ADDRESS: '0xDbA6129C02E69405622fAdc3d5A7f8d23eac3b97'
TEST_TOKEN_ADDRESS: '0xfA5539fBEd27887EEbb2515672D80412D1A3ADa3'
TEST_WALLET1_PRIVATE_KEY: ${{ secrets.TEST_WALLET1_PRIVATE_KEY }}
TEST_WALLET1_STARK_PRIVATE_KEY: ${{ secrets.TEST_WALLET1_STARK_PRIVATE_KEY }}
TEST_WALLET2_PRIVATE_KEY: ${{ secrets.TEST_WALLET2_PRIVATE_KEY }}
TEST_WALLET2_STARK_PRIVATE_KEY: ${{ secrets.TEST_WALLET2_STARK_PRIVATE_KEY }}
TEST_WALLET_BANKER_PRIVATE_KEY: ${{ secrets.TEST_WALLET_BANKER_PRIVATE_KEY }}
TEST_WALLET_BANKER_STARK_PRIVATE_KEY: ${{ secrets.TEST_WALLET_BANKER_STARK_PRIVATE_KEY }}
TEST_STARKEX_BATCH_SIZE: 500
run: cd tests/func-tests/imx && yarn test:ci
- name: Run tests
env:
NETWORK: sepolia
TEST_ALCHEMY_API_KEY: ${{ secrets.TEST_ALCHEMY_API_KEY }}
PUBLIC_API_URL: "https://api.sandbox.x.immutable.com/v1"
TEST_STARK_CONTRACT_ADDRESS: "0x2d5C349fD8464DA06a3f90b4B0E9195F3d1b7F98"
TEST_REGISTRATION_CONTRACT_ADDRESS: "0xDbA6129C02E69405622fAdc3d5A7f8d23eac3b97"
TEST_TOKEN_ADDRESS: "0xfA5539fBEd27887EEbb2515672D80412D1A3ADa3"
TEST_WALLET1_PRIVATE_KEY: ${{ secrets.TEST_WALLET1_PRIVATE_KEY }}
TEST_WALLET1_STARK_PRIVATE_KEY: ${{ secrets.TEST_WALLET1_STARK_PRIVATE_KEY }}
TEST_WALLET2_PRIVATE_KEY: ${{ secrets.TEST_WALLET2_PRIVATE_KEY }}
TEST_WALLET2_STARK_PRIVATE_KEY: ${{ secrets.TEST_WALLET2_STARK_PRIVATE_KEY }}
TEST_WALLET_BANKER_PRIVATE_KEY: ${{ secrets.TEST_WALLET_BANKER_PRIVATE_KEY }}
TEST_WALLET_BANKER_STARK_PRIVATE_KEY: ${{ secrets.TEST_WALLET_BANKER_STARK_PRIVATE_KEY }}
TEST_STARKEX_BATCH_SIZE: 500
run: cd tests/func-tests/imx && yarn test:ci
44 changes: 22 additions & 22 deletions .github/workflows/functional-tests-zkevm.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
name: Functional Tests (zkEVM)
on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"

- name: Install root dependencies
run: npm install -g yarn && yarn install --immutable
- name: Install root dependencies
run: npm install -g yarn && yarn install --immutable

- name: Build SDK
run: yarn build
- name: Build SDK
run: yarn build

- name: Install functional tests dependencies
run: cd tests/func-tests/zkevm && yarn install --no-immutable
- name: Install functional tests dependencies
run: cd tests/func-tests/zkevm && yarn install --no-immutable

- name: Run tests
env:
ZKEVM_ORDERBOOK_BANKER: ${{ secrets.ZKEVM_ORDERBOOK_BANKER }}
ZKEVM_ORDERBOOK_ERC721: '0xBE8B131f39825282Ace9eFf99C0Bb14972417b49'
SEAPORT_CONTRACT_ADDRESS: '0x7d117aA8BD6D31c4fa91722f246388f38ab1942c'
ZONE_CONTRACT_ADDRESS: '0x8831867E347AB87FA30199C5B695F0A31604Bb52'
ZKEVM_RPC_ENDPOINT: 'https://rpc.testnet.immutable.com'
ORDERBOOK_MR_API_URL: 'https://api.sandbox.immutable.com'
ZKEVM_CHAIN_NAME: 'imtbl-zkevm-testnet'
run: cd tests/func-tests/zkevm && yarn test:ci
- name: Run tests
env:
ZKEVM_ORDERBOOK_BANKER: ${{ secrets.ZKEVM_ORDERBOOK_BANKER }}
ZKEVM_ORDERBOOK_ERC721: "0xBE8B131f39825282Ace9eFf99C0Bb14972417b49"
SEAPORT_CONTRACT_ADDRESS: "0x7d117aA8BD6D31c4fa91722f246388f38ab1942c"
ZONE_CONTRACT_ADDRESS: "0x8831867E347AB87FA30199C5B695F0A31604Bb52"
ZKEVM_RPC_ENDPOINT: "https://rpc.testnet.immutable.com"
ORDERBOOK_MR_API_URL: "https://api.sandbox.immutable.com"
ZKEVM_CHAIN_NAME: "imtbl-zkevm-testnet"
run: cd tests/func-tests/zkevm && yarn test:ci
4 changes: 2 additions & 2 deletions .github/workflows/passport-sdk-sample-app-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Passport SDK Sample App Deployment
on:
push:
paths:
- 'packages/passport/**'
- "packages/passport/**"
branches:
- main
workflow_dispatch:
Expand Down Expand Up @@ -64,4 +64,4 @@ jobs:
- name: Clear the cloudfront cache
run: |
aws cloudfront create-invalidation --distribution-id ${{ secrets.CF_PASSPORT_PROD_DISTRIBUTION_ID }} --paths "/*"
aws cloudfront create-invalidation --distribution-id ${{ secrets.CF_PASSPORT_PROD_DISTRIBUTION_ID }} --paths "/*"
56 changes: 28 additions & 28 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
name: Playwright Tests
on:
push:
branches: [ main, master ]
branches: [main, master]
pull_request:
branches: [ main, master ]
branches: [main, master]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.40.0-jammy
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: samples/apps/ts-immutable-sample/.nvmrc

- name: Install root dependencies
run: npm install -g yarn && yarn install --immutable
- name: Install root dependencies
run: npm install -g yarn && yarn install --immutable

- name: Build SDK
run: yarn build
- name: Build SDK
run: yarn build

- name: Install sample apps dependencies
run: cd samples/apps/ts-immutable-sample && yarn install --no-immutable
- name: Install sample apps dependencies
run: cd samples/apps/ts-immutable-sample && yarn install --no-immutable

- name: Run Unit tests
run: cd samples/apps/ts-immutable-sample && yarn test
- name: Run Playwright tests
env:
# Required for Firefox to run
# https://github.com/microsoft/playwright/issues/6500#issuecomment-838515115
HOME: /root
working-directory: samples/apps/ts-immutable-sample
run: yarn playwright test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
- name: Run Unit tests
run: cd samples/apps/ts-immutable-sample && yarn test

- name: Run Playwright tests
env:
# Required for Firefox to run
# https://github.com/microsoft/playwright/issues/6500#issuecomment-838515115
HOME: /root
working-directory: samples/apps/ts-immutable-sample
run: yarn playwright test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
4 changes: 2 additions & 2 deletions .github/workflows/publish-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: lts/*
cache: 'yarn'
node-version-file: .nvmrc
cache: "yarn"

- name: Update SDK package.json version
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish-major-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
id: allowed_actors_check
# only allow certain SDK team members to run this workflow
if: ${{ contains(fromJson(env.SDK_PUBLISH_MAJOR_VERSION_ACTORS), github.triggering_actor) }}
run: echo "ALLOWED_ACTOR=true" >> $GITHUB_OUTPUT
run: echo "ALLOWED_ACTOR=true" >> $GITHUB_OUTPUT

- name: Allowed Actors Filter
if: ${{ steps.allowed_actors_check.outputs.ALLOWED_ACTOR != 'true' }}
Expand All @@ -85,8 +85,8 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: lts/*
cache: 'yarn'
node-version-file: .nvmrc
cache: "yarn"

- name: Workout next version string
run: |
Expand Down Expand Up @@ -162,7 +162,7 @@ jobs:
# Wait for 30 seconds to make sure the tag is available on GitHub
- uses: GuillaumeFalourd/wait-sleep-action@v1
with:
time: '30'
time: "30"

- name: Create GitHub Release
id: gh_release
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: lts/*
cache: 'yarn'
node-version-file: .nvmrc
cache: "yarn"

- name: Workout next version string
run: |
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
# Wait for 30 seconds to make sure the tag is available on GitHub
- uses: GuillaumeFalourd/wait-sleep-action@v1
with:
time: '30'
time: "30"

- name: Create GitHub Release
id: gh_release
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/*

0 comments on commit 3c58e0e

Please sign in to comment.