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

The Big Emigration (ciao sdks) #10829

Merged
merged 18 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 0 additions & 5 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [
[
"@celo/wallet-*"
]
],
"linked": [],
"access": "public",
"baseBranch": "master",
Expand Down
37 changes: 0 additions & 37 deletions .gitattributes

This file was deleted.

5 changes: 0 additions & 5 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,11 @@
/dockerfiles/ @celo-org/devopsre

/packages/celotool/ @celo-org/devopsre
/packages/cli/ @celo-org/devtooling
/packages/dev-utils/ @celo-org/devtooling
/packages/docs/ @celo-org/devtooling @celo-org/primitives @celo-org/devrel
/packages/env-tests/ @celo-org/primitives
/packages/faucet/ @celo-org/devtooling
/packages/helm-charts/ @celo-org/devopsre
/packages/helm-charts/mock-oracle/ @celo-org/mento @celo-org/devopsre
/packages/helm-charts/oracle-rbac/ @celo-org/mento @celo-org/devopsre
/packages/helm-charts/oracle/ @celo-org/mento @celo-org/devopsre
/packages/metadata-crawler/ @celo-org/devopsre
/packages/protocol/ @celo-org/primitives
/packages/sdk/ @celo-org/devtooling
/packages/typescript/ @celo-org/devtooling
2 changes: 1 addition & 1 deletion .github/actions/sync-workspace/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ runs:
if: ${{ fromJSON(env.REBUILD_PACKAGE) }}
run: |
yarn install
yarn build --ignore docs --include-dependencies
yarn build --include-dependencies
193 changes: 8 additions & 185 deletions .github/workflows/celo-monorepo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ defaults:

env:
# Increment these to force cache rebuilding
NODE_MODULE_CACHE_VERSION: 4
NODE_MODULE_CACHE_VERSION: 5
NODE_OPTIONS: '--max-old-space-size=4096'
TERM: dumb
GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.parallel=false -Dorg.gradle.configureondemand=true -Dorg.gradle.jvmargs="-Xmx4096m -XX:+HeapDumpOnOutOfMemoryError"'
Expand Down Expand Up @@ -71,13 +71,13 @@ jobs:
restore-keys: |
node-${{ runner.os }}-${{ runner.arch }}-${{ env.NODE_MODULE_CACHE_VERSION }}-
- name: Install yarn dependencies
run: git config --global url."https://".insteadOf ssh:// && yarn install
run: git config --global url."https://".insteadOf ssh:// && yarn install --verbose --frozen-lockfile --network-timeout 1000000
aaronmgdr marked this conversation as resolved.
Show resolved Hide resolved
if: steps.cache_node.outputs.cache-hit != 'true'
- name: Run yarn postinstall if cache hitted
run: yarn run postinstall
if: steps.cache_node.outputs.cache-hit == 'true'
- name: Build packages
run: yarn build --ignore docs --include-dependencies
run: yarn build --include-dependencies
- name: Check licenses
if: steps.cache_node.outputs.cache-hit != 'true'
run: |
Expand Down Expand Up @@ -170,45 +170,25 @@ jobs:
mkdir -p test-results/jest
# Skipping packages that are tested in a specific job below
yarn run lerna \
--ignore @celo/contractkit \
--ignore @celo/protocol \
--ignore @celo/celotool \
--ignore @celo/celocli \
--ignore @celo/env-tests \
--ignore '@celo/wallet-*' \
run test
- name: Upload Jest Test Results
uses: actions/upload-artifact@v3
with:
name: Jest Test Results
path: test-results/jest
wallet-test:
name: Wallet test
runs-on: ['self-hosted', 'monorepo-node18']
timeout-minutes: 30
needs: install-dependencies
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Sync workspace
uses: ./.github/actions/sync-workspace
with:
artifacts_to_cache: ${{ needs.install-dependencies.outputs.artifacts_to_cache }}
- name: Run Wallet tests
run: |
yarn run lerna --scope '@celo/wallet-*' run test


protocol-test-release:
name: Protocol Test Release
runs-on: ['self-hosted', 'monorepo-node18']
timeout-minutes: 500
needs: [install-dependencies, lint-checks]
if: |
github.base_ref == 'master' || contains(github.base_ref, 'staging') || contains(github.base_ref, 'production') ||
github.base_ref == 'master' || contains(github.base_ref, 'release') || contains(github.base_ref, 'production') ||
aaronmgdr marked this conversation as resolved.
Show resolved Hide resolved
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/protocol') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/sdk') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/typescript') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',package.json') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',yarn.lock') ||
false
Expand Down Expand Up @@ -246,7 +226,6 @@ jobs:
if: |
github.base_ref == 'master' || contains(github.base_ref, 'staging') || contains(github.base_ref, 'production') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/protocol') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/sdk') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/typescript') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',package.json') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',yarn.lock') ||
Expand Down Expand Up @@ -299,172 +278,17 @@ jobs:
command: |
${{ matrix.command }}

contractkit-tests:
name: ContractKit Tests
runs-on: ['self-hosted', 'monorepo-node18']
timeout-minutes: 30
needs: [install-dependencies]
if: |
github.base_ref == 'master' || contains(github.base_ref, 'staging') || contains(github.base_ref, 'production') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/protocol') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/dev-utils') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/sdk') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/typescript') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',package.json') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',yarn.lock') ||
false
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Sync workspace
uses: ./.github/actions/sync-workspace
with:
artifacts_to_cache: ${{ needs.install-dependencies.outputs.artifacts_to_cache }}
- name: Run tests
run: |
yarn --cwd=packages/sdk/contractkit test

cli-tests:
name: CeloCli Tests
runs-on: ['self-hosted', 'monorepo-node18']
timeout-minutes: 30
needs: [install-dependencies]
if: |
github.base_ref == 'master' || contains(github.base_ref, 'staging') || contains(github.base_ref, 'production') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/cli') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/protocol') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/dev-utils') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/sdk') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/typescript') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',package.json') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',yarn.lock') ||
false
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Sync workspace
uses: ./.github/actions/sync-workspace
with:
artifacts_to_cache: ${{ needs.install-dependencies.outputs.artifacts_to_cache }}
- name: Run tests
run: |
yarn --cwd=packages/cli test
- name: Fail if someone forgot to commit CLI docs
run: |
yarn --cwd=packages/cli docs
if [[ $(git status packages/docs/command-line-interface --porcelain) ]]; then
git --no-pager diff packages/docs/command-line-interface
echo "There are git differences after generating CLI docs"
git status
git diff
exit 1
fi
- name: Verify that a new account can be created
run: |
yarn --cwd=packages/cli run celocli account:new
- name: Test that releasecelo command topic is working
run: |
yarn --cwd=packages/cli run celocli releasecelo --help
typescript-tests:
name: Typescript package Tests
runs-on: ['self-hosted', 'monorepo-node18']
timeout-minutes: 30
needs: [install-dependencies]
if: |
github.base_ref == 'master' || contains(github.base_ref, 'staging') || contains(github.base_ref, 'production') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/typescript') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',package.json') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',yarn.lock') ||
false
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Sync workspace
uses: ./.github/actions/sync-workspace
with:
artifacts_to_cache: ${{ needs.install-dependencies.outputs.artifacts_to_cache }}
- name: Install and test the npm package
run: |
set -euo pipefail
cd packages/typescript
yarn pack
cd $RUNNER_TEMP
npm install $RUNNER_WORKSPACE/celo-monorepo/packages/typescript/*.tgz

base-test:
name: SDK Base package Tests
runs-on: ['self-hosted', 'monorepo-node18']
timeout-minutes: 30
needs: [install-dependencies]
if: |
github.base_ref == 'master' || contains(github.base_ref, 'staging') || contains(github.base_ref, 'production') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/sdk') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/typescript') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',package.json') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',yarn.lock') ||
false
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Sync workspace
uses: ./.github/actions/sync-workspace
with:
artifacts_to_cache: ${{ needs.install-dependencies.outputs.artifacts_to_cache }}
- name: Install and test the npm package
run: |
set -euo pipefail
cd packages/sdk/base
yarn pack
cd $RUNNER_TEMP
npm install $RUNNER_WORKSPACE/celo-monorepo/packages/sdk/base/*.tgz

utils-test:
name: SDK Utils package Tests
runs-on: ['self-hosted', 'monorepo-node18']
timeout-minutes: 30
needs: [install-dependencies]
if: |
github.base_ref == 'master' || contains(github.base_ref, 'staging') || contains(github.base_ref, 'production') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/sdk') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/typescript') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',package.json') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',yarn.lock') ||
false
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Sync workspace
uses: ./.github/actions/sync-workspace
with:
artifacts_to_cache: ${{ needs.install-dependencies.outputs.artifacts_to_cache }}
- name: Install and test the npm package
run: |
set -euo pipefail
cd packages/sdk/base
yarn pack
cd ../utils
yarn pack
cd $RUNNER_TEMP
npm install $RUNNER_WORKSPACE/celo-monorepo/packages/sdk/base/*.tgz
npm install $RUNNER_WORKSPACE/celo-monorepo/packages/sdk/utils/*.tgz

end-to-end-geth-matrix:
# Keeping name short because GitHub UI does not handle long names well
name: e2e ${{ matrix.name }}
runs-on: ['self-hosted', 'monorepo-node18']
timeout-minutes: 60
needs: [install-dependencies, lint-checks, contractkit-tests]
needs: [install-dependencies, lint-checks]
if: |
github.base_ref == 'master' || contains(github.base_ref, 'staging') || contains(github.base_ref, 'production') ||
github.base_ref == 'master' || contains(github.base_ref, 'release') || contains(github.base_ref, 'production') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/celotool') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/protocol') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/dev-utils') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/sdk') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/typescript') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',package.json') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',yarn.lock') ||
Expand Down Expand Up @@ -549,9 +373,8 @@ jobs:
# Disable as certora license is not active
if: |
false && (
github.base_ref == 'master' || contains(github.base_ref, 'staging') || contains(github.base_ref, 'production') ||
github.base_ref == 'master' || contains(github.base_ref, 'release') || contains(github.base_ref, 'production') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/protocol') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/sdk') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',package.json') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',yarn.lock')
)
Expand Down
42 changes: 0 additions & 42 deletions .github/workflows/container-cli.yml

This file was deleted.

Loading
Loading