Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into gonza/foreign-asset…
Browse files Browse the repository at this point in the history
…s-via-token-lock
  • Loading branch information
gonzamontiel committed Dec 27, 2024
2 parents 793236a + d09a674 commit 0c891f5
Show file tree
Hide file tree
Showing 438 changed files with 26,234 additions and 17,321 deletions.
16 changes: 0 additions & 16 deletions .github/workflow-templates/dev-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,6 @@ runs:
cache: "pnpm"
cache-dependency-path: pnpm-lock.yaml

- name: Setup Moonbeam PolkadotJS types
shell: bash
run: |
#### Preparing the legacy types
cd moonbeam-types-bundle
pnpm i
pnpm build
#### Preparing the typescript api
cd ../typescript-api
pnpm i
pnpm build
cd ../test
pnpm add ../typescript-api
- name: "Install and run dev test"
shell: bash
env:
Expand Down
172 changes: 54 additions & 118 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ jobs:
use-quiet-mode: "yes"
max-depth: 4

check-editorconfig:
name: "Check editorconfig"
check-biome:
name: "Check with Biome"
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -162,68 +162,17 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ needs.set-tags.outputs.git_ref }}
- name: Setup editorconfig checker
run: |
ls /tmp/bin/ec-linux-amd64 || \
cd /tmp && \
wget https://github.com/editorconfig-checker/editorconfig-checker/releases/download/2.7.0/ec-linux-amd64.tar.gz && \
tar xvf ec-linux-amd64.tar.gz && \
chmod +x bin/ec-linux-amd64
- name: Check files
# Prettier and editorconfig-checker have different ideas about indentation
run: /tmp/bin/ec-linux-amd64 --exclude "(typescript-api\/)|(test\/contracts\/lib\/.*)" -disable-indent-size

check-prettier:
name: "Check with Prettier"
runs-on: ubuntu-latest
permissions:
contents: read
needs: ["set-tags"]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ needs.set-tags.outputs.git_ref }}
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Check with Prettier
run: |
bun x prettier@2 --check --ignore-path .prettierignore '**/*.(yml|js|ts|json)' \
|| (git diff --quiet \
|| (echo 'Unable to show a diff because there are unstaged changes'; false) \
&& (bun x prettier@2 --ignore-path \
.prettierignore '**/*.(yml|js|ts|json)' -w --loglevel silent \
&& git --no-pager diff; git restore .) && false)
bun x prettier@2 --check --ignore-path .prettierignore '**/*.(yml|js|ts|json)'
check-eslint:
name: "Check with EsLint"
runs-on: ubuntu-latest
permissions:
contents: read
needs: ["set-tags"]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ needs.set-tags.outputs.git_ref }}
- name: Use pnpm
uses: pnpm/action-setup@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- name: Use Node.js
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: "test/.nvmrc"
cache: "pnpm"
cache-dependency-path: pnpm-lock.yaml
- name: Run Eslint check
run: |
cd test
pnpm i
pnpm lint
- run: pnpm install
- run: pnpm check

check-cargo-toml-format:
name: "Check Cargo.toml files format"
Expand Down Expand Up @@ -350,7 +299,7 @@ jobs:
permissions:
contents: read
pull-requests: write
if: github.event_name == 'pull_request'
if: ${{ github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork }}
needs: ["set-tags", "build"]
env:
GH_TOKEN: ${{ github.token }}
Expand Down Expand Up @@ -554,6 +503,48 @@ jobs:
- name: Run sccache stat for check pre test
run: ${SCCACHE_PATH} --show-stats

# Renable typegen_check when we have a bot in place to update PR for us in case of missing it

# typegen_check:
# needs: ["set-tags", "build"]
# name: "Check Rust/TS bindings are up to date"
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# ref: ${{ needs.set-tags.outputs.git_ref }}
# - uses: pnpm/action-setup@v4
# with:
# version: 9
# - uses: actions/setup-node@v4
# with:
# node-version-file: "test/.nvmrc"
# cache: "pnpm"
# cache-dependency-path: pnpm-lock.yaml
# - name: "Download branch built node"
# uses: actions/download-artifact@v4
# with:
# name: moonbeam
# path: target/release
# - run: chmod uog+x target/release/moonbeam
# - name: Run Typegen
# run: |
# pnpm i

# cd test
# pnpm typegen
# - name: Check for changes
# run: |
# cd typescript-api
# if [ -n "$(git status --porcelain .)" ]; then
# echo "Typegen produced changes. Please run 'pnpm typegen' locally and commit the changes."
# false
# else
# echo "No changes"
# true
# fi

dev-test:
runs-on:
labels: bare-metal
Expand Down Expand Up @@ -619,7 +610,7 @@ jobs:

typescript-tracing-tests:
if: >
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) ||
(github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork) ||
(github.event_name == 'push' && github.ref == 'refs/heads/master')
runs-on:
labels: bare-metal
Expand Down Expand Up @@ -661,16 +652,6 @@ jobs:
run: |
chmod uog+x build/moonbeam
chmod uog+x target/release/moonbeam
#### Preparing the repository
cd moonbeam-types-bundle
pnpm i
pnpm build
#### Preparing the typescript api
cd ../typescript-api
pnpm i
pnpm build
- name: Running Tracing Tests
env:
DEBUG_COLOURS: "1"
Expand Down Expand Up @@ -706,7 +687,7 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.6.1
uses: docker/setup-buildx-action@v3.7.1
with:
version: latest
driver-opts: |
Expand Down Expand Up @@ -739,7 +720,7 @@ jobs:
labels: bare-metal
permissions:
contents: read
needs: ["set-tags", "build", "typescript-tracing-tests"]
needs: ["set-tags", "build"]
strategy:
fail-fast: false
max-parallel: 1
Expand Down Expand Up @@ -774,21 +755,6 @@ jobs:
with:
name: moonbeam
path: target/release
- name: Setup Moonbeam PolkadotJS types
shell: bash
run: |
#### Preparing the legacy types
cd moonbeam-types-bundle
pnpm i
pnpm build
#### Preparing the typescript api
cd ../typescript-api
pnpm i
pnpm build
cd ../test
pnpm add ../typescript-api
- name: "Run lazy loading tests"
run: |
chmod uog+x target/release/moonbeam
Expand All @@ -812,7 +778,7 @@ jobs:
chopsticks-upgrade-test:
runs-on:
labels: bare-metal
needs: ["set-tags", "build", "typescript-tracing-tests"]
needs: ["set-tags", "build"]
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -842,21 +808,6 @@ jobs:
with:
name: runtimes
path: target/release/wbuild/${{ matrix.chain }}-runtime/
- name: Setup Moonbeam PolkadotJS types
shell: bash
run: |
#### Preparing the legacy types
cd moonbeam-types-bundle
pnpm i
pnpm build
#### Preparing the typescript api
cd ../typescript-api
pnpm i
pnpm build
cd ../test
pnpm add ../typescript-api
- name: "Install and run upgrade test"
run: |
cd test
Expand All @@ -874,7 +825,7 @@ jobs:
zombie_upgrade_test:
runs-on:
labels: bare-metal
needs: ["set-tags", "build", "typescript-tracing-tests"]
needs: ["set-tags", "build"]
strategy:
fail-fast: false
max-parallel: 1
Expand Down Expand Up @@ -919,21 +870,6 @@ jobs:
docker create --name moonbeam_container $DOCKER_TAG bash
docker cp moonbeam_container:moonbeam/moonbeam test/tmp/moonbeam_rt
docker rm -f moonbeam_container
- name: Setup Moonbeam PolkadotJS types
shell: bash
run: |
#### Preparing the legacy types
cd moonbeam-types-bundle
pnpm i
pnpm build
#### Preparing the typescript api
cd ../typescript-api
pnpm i
pnpm build
cd ../test
pnpm add ../typescript-api
- name: Prepare Chainspecs
run: |
cd test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prepare-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.6.1
uses: docker/setup-buildx-action@v3.7.1
with:
version: latest
driver-opts: |
Expand Down
65 changes: 0 additions & 65 deletions .github/workflows/upgrade-typescript-api.yml

This file was deleted.

6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# Typescript directories
**/node_modules
**/.yarn
**/dist

# Spec/Wasm build directory
/build/
Expand All @@ -19,5 +20,6 @@ tools/*-local.json
tools/*-local-raw.json
tools/build

# RustRover
.idea/
# IDEs
.idea/
.vscode/
Loading

0 comments on commit 0c891f5

Please sign in to comment.