Skip to content

init zombienet tests #35

init zombienet tests

init zombienet tests #35

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
merge_group:
workflow_dispatch:
jobs:
build:
timeout-minutes: 10
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- uses: actions/[email protected]
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- name: Install deps
run: pnpm install
- name: Build
run: pnpm build
- name: Run lint
run: pnpm lint
- name: Run tests
run: pnpm test
publish:
if: contains(fromJSON('["push", "pull_request"]'), github.event_name)
needs: build
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 20.x
cache: pnpm
registry-url: https://registry.npmjs.org
- name: Install deps
run: pnpm install
- name: Build
run: pnpm build
- name: Pack
run: |
pnpm dlx lerna init
pnpm dlx lerna version prerelease --no-git-tag-version --yes --exact --preid ${{ github.sha }}.${{ github.run_attempt }}
pnpm pack --dir packages/cli
pnpm pack --dir packages/json-rpc-provider
pnpm pack --dir packages/sc-provider
pnpm pack --dir packages/substrate-bindings
pnpm pack --dir packages/substrate-client
pnpm pack --dir packages/substrate-codegen
pnpm pack --dir packages/utils
- uses: actions/upload-artifact@v3
with:
name: package
path: ./packages/cli/*.tgz
- uses: actions/upload-artifact@v3
with:
name: package
path: ./packages/json-rpc-provider/*.tgz
- uses: actions/upload-artifact@v3
with:
name: package
path: ./packages/sc-provider/*.tgz
- uses: actions/upload-artifact@v3
with:
name: package
path: ./packages/substrate-bindings/*.tgz
- uses: actions/upload-artifact@v3
with:
name: package
path: ./packages/substrate-client/*.tgz
- uses: actions/upload-artifact@v3
with:
name: package
path: ./packages/substrate-codegen/*.tgz
- uses: actions/upload-artifact@v3
with:
name: package
path: ./packages/utils/*.tgz
- name: NPM Publish automation
uses: octokit/[email protected]
with:
route: POST /repos/paritytech/npm_publish_automation/actions/workflows/publish.yml/dispatches
ref: main
inputs: '${{ format(''{{ "repo": "{0}", "run_id": "{1}", "npm_tag": "{2}" }}'', github.repository, github.run_id, github.ref_name == ''main'' && ''next'' || format(''pr-{0}'', github.event.number)) }}'
env:
GITHUB_TOKEN: ${{ secrets.NPM_PUBLISH_AUTOMATION_TOKEN }}