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

CI Reliability #2571

Closed
wants to merge 14 commits into from
Closed
2 changes: 1 addition & 1 deletion .github/workflow-templates/dev-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ runs:
version: 8.6.12
- uses: actions/setup-node@v3
with:
node-version: 20.x
node-version: 20.10
cache: "pnpm"
cache-dependency-path: test/pnpm-lock.yaml

Expand Down
136 changes: 67 additions & 69 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,10 @@ jobs:
uses: pnpm/action-setup@v2
with:
version: 8.6.12
- name: Use Node.js 20.x
- name: Use Node.js 20.10
uses: actions/setup-node@v3
with:
node-version: 20.x
node-version: 20.10
cache: "pnpm"
cache-dependency-path: test/pnpm-lock.yaml
- name: Run Eslint check
Expand Down Expand Up @@ -365,6 +365,58 @@ jobs:
- name: Run sccache stat for check pre test
run: ${SCCACHE_PATH} --show-stats

dev-test:
runs-on:
labels: bare-metal
needs: ["set-tags", "build"]
timeout-minutes: 20
strategy:
matrix:
chain: ["moonbase"]
env:
GH_WORKFLOW_MATRIX_CHAIN: ${{ matrix.chain }}
DEBUG_COLORS: 1
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ needs.set-tags.outputs.git_ref }}
- run: |
mkdir -p target/release
- name: "Download branch built node"
uses: actions/[email protected]
with:
name: moonbeam
path: target/release
- name: "Run Moonwall Dev Tests"
uses: ./.github/workflow-templates/dev-tests
with:
moonwall_environment: dev_${{ matrix.chain }}
- name: Upload HTML report to s3
if: |
github.event.pull_request.head.repo.full_name == github.repository && github.event_name == 'push'
uses: mario-sangar/upload-s3-action@master
id: S3
with:
aws_key_id: ${{ secrets.S3_COVERAGE_ID }}
aws_secret_access_key: ${{ secrets.S3_COVERAGE_KEY }}
aws_bucket: ${{ vars.S3_COVERAGE_BUCKET }}
destination_dir: "${{ needs.set-tags.outputs.test_s3_dir }}"
source_dir: "test/html"
acl: "none"
# - name: Upload to Moonscope
# if: github.event.pull_request.head.repo.full_name == github.repository
# run: |
# curl --location 'https://api.moonscope.kaki.dev/insert' \
# -X POST \
# --header 'moonwallenv: dev_${{ matrix.chain }}' \
# --header 'Authorization: Bearer ${{ secrets.MOONSCOPE_TOKEN }}' \
# --header 'table: dev_reports' \
# --header 'branch: ${{ needs.set-tags.outputs.git_branch }}' \
# --header 'Content-Type: application/json' \
# --max-time 30 \
# -d@test/tmp/testResults.json || echo "Curl command failed but continuing"

typescript-tests:
runs-on:
labels: bare-metal
Expand All @@ -387,7 +439,9 @@ jobs:
timeout: 30000

typescript-tracing-tests:
if: github.event.pull_request.head.repo.full_name == github.repository
if: >
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) ||
(github.event_name == 'push' && github.ref == 'refs/heads/master')
runs-on:
labels: bare-metal
needs: ["set-tags", "build"]
Expand All @@ -404,10 +458,10 @@ jobs:
uses: pnpm/action-setup@v2
with:
version: 8.6.12
- name: Use Node.js 20.x
- name: Use Node.js 20.10
uses: actions/setup-node@v3
with:
node-version: 20.x
node-version: 20.10
cache: "pnpm"
cache-dependency-path: test/pnpm-lock.yaml
- run: |
Expand Down Expand Up @@ -435,19 +489,15 @@ jobs:
#### Preparing the typescript api
cd ../typescript-api
npm ci
- name: Running Tracing Tests (with retry)
- name: Running Tracing Tests
env:
DEBUG_COLOURS: "1"
NODE_OPTIONS: "--max-old-space-size=12288"
uses: nick-fields/retry@v2
with:
max_attempts: 3
timeout_minutes: 5
command: |
cd test
pnpm install
pnpm compile-solidity
pnpm moonwall test dev_moonbase_tracing
run: |
cd test
pnpm install
pnpm compile-solidity
pnpm moonwall test dev_moonbase_tracing

docker-moonbeam:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -535,7 +585,7 @@ jobs:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 20.x
node-version: 20.10
cache: "pnpm"
cache-dependency-path: test/pnpm-lock.yaml
- name: Create local folders
Expand Down Expand Up @@ -583,7 +633,7 @@ jobs:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 20.x
node-version: 20.10
- name: Create local folders
run: |
mkdir -p target/release/wbuild/${{ matrix.chain }}-runtime/
Expand Down Expand Up @@ -634,55 +684,3 @@ jobs:
with:
name: failed-node-logs
path: ${{ env.NODE_LOGS_ZIP }}

dev-test:
runs-on:
labels: bare-metal
needs: ["set-tags", "build"]
timeout-minutes: 20
strategy:
matrix:
chain: ["moonbase"]
env:
GH_WORKFLOW_MATRIX_CHAIN: ${{ matrix.chain }}
DEBUG_COLORS: 1
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ needs.set-tags.outputs.git_ref }}
- run: |
mkdir -p target/release
- name: "Download branch built node"
uses: actions/[email protected]
with:
name: moonbeam
path: target/release
- name: "Run Moonwall Dev Tests"
uses: ./.github/workflow-templates/dev-tests
with:
moonwall_environment: dev_${{ matrix.chain }}
- name: Upload HTML report to s3
if: |
github.event.pull_request.head.repo.full_name == github.repository && github.event_name == 'push'
uses: mario-sangar/upload-s3-action@master
id: S3
with:
aws_key_id: ${{ secrets.S3_COVERAGE_ID }}
aws_secret_access_key: ${{ secrets.S3_COVERAGE_KEY }}
aws_bucket: ${{ vars.S3_COVERAGE_BUCKET }}
destination_dir: "${{ needs.set-tags.outputs.test_s3_dir }}"
source_dir: "test/html"
acl: "none"
- name: Upload to Moonscope
if: github.event.pull_request.head.repo.full_name == github.repository
run: |
curl --location 'https://api.moonscope.kaki.dev/insert' \
-X POST \
--header 'moonwallenv: dev_${{ matrix.chain }}' \
--header 'Authorization: Bearer ${{ secrets.MOONSCOPE_TOKEN }}' \
--header 'table: dev_reports' \
--header 'branch: ${{ needs.set-tags.outputs.git_branch }}' \
--header 'Content-Type: application/json' \
--max-time 30 \
-d@test/tmp/testResults.json || echo "Curl command failed but continuing"
8 changes: 4 additions & 4 deletions .github/workflows/publish-typescript-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.sha }}
- name: Use Node.js 20.x
- name: Use Node.js 20.10
uses: actions/setup-node@v3
with:
node-version: 20.x
node-version: 20.10
- name: Build typescript API
run: |
cd typescript-api
Expand All @@ -37,10 +37,10 @@ jobs:
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.sha }}
- name: Use Node.js 20.x
- name: Use Node.js 20.10
uses: actions/setup-node@v3
with:
node-version: 20.x
node-version: 20.10
- name: Upgrade polkadotjs for tests
run: |
cd test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upgrade-typescript-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
mkdir -p build
docker cp dummy:/moonbeam/moonbeam build/moonbeam
docker rm -f dummy
- name: Use Node.js 20.x
- name: Use Node.js 20.10
uses: actions/setup-node@v4
with:
node-version: 20.9.0
Expand Down
10 changes: 1 addition & 9 deletions test/moonwall.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -309,15 +309,7 @@
"compile-contracts.ts compile",
"compile-wasm.ts compile -b ../target/release/moonbeam -o wasm -c moonbase-dev"
],
"multiThreads": {
"threads": {
"isolate": true,
"minThreads": 1,
"maxThreads": 8,
"singleThread": false,
"useAtomics": false
}
},
"multiThreads": 6,
"envVars": ["DEBUG_COLORS=1"],
"reporters": ["basic", "html", "json"],
"reportFile": { "json": "./tmp/testResults.json" },
Expand Down
12 changes: 6 additions & 6 deletions test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"dependencies": {
"@acala-network/chopsticks": "0.9.2",
"@moonbeam-network/api-augment": "0.2600.0",
"@moonwall/cli": "4.4.2",
"@moonwall/util": "4.4.2",
"@moonwall/cli": "5.0.0-beta.6",
"@moonwall/util": "5.0.0-beta.6",
"@openzeppelin/contracts": "4.9.3",
"@polkadot/api": "10.11.1",
"@polkadot/api-augment": "10.11.1",
Expand All @@ -33,7 +33,7 @@
"@polkadot/util-crypto": "12.6.1",
"@substrate/txwrapper-core": "7.1.1",
"@substrate/txwrapper-substrate": "7.1.1",
"@vitest/ui": "1.0.0-beta.5",
"@vitest/ui": "0.34.6",
"@zombienet/utils": "0.0.24",
"chalk": "5.3.0",
"eth-object": "github:aurora-is-near/eth-object#master",
Expand All @@ -45,8 +45,8 @@
"rlp": "3.0.0",
"semver": "7.5.4",
"solc": "0.8.21",
"viem": "1.19.1",
"vitest": "1.0.0-beta.5",
"viem": "1.19.8",
"vitest": "0.34.6",
"web3": "4.2.1"
},
"devDependencies": {
Expand All @@ -61,7 +61,7 @@
"debug": "4.3.4",
"eslint": "8.54.0",
"eslint-plugin-unused-imports": "3.0.0",
"ethers": "6.8.0",
"ethers": "6.7.1",
"prettier": "2.8.8",
"tsx": "3.14.0",
"typescript": "5.2.2",
Expand Down
Loading