Skip to content

[WIP] Move CI from Gitlab to GitHub #3973

[WIP] Move CI from Gitlab to GitHub

[WIP] Move CI from Gitlab to GitHub #3973

Workflow file for this run

name: ZombieNet Basic CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 19.x, 20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install
working-directory: "./javascript"
- run: npm run build
working-directory: "./javascript"
- run: npm run lint
working-directory: "./javascript"
- run: npm run test
working-directory: "./javascript"
- name: Upload build artifacts
if: ${{ matrix.node-version == '18.x' }}
uses: actions/upload-artifact@v3
with:
name: ${{ runner.os }}-build-${{ github.sha }}
path: |
javascript/packages/cli/dist
javascript/packages/orchestrator/dist
javascript/packages/utils/dist
build-rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust Stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Run cargo fmt
run: cargo fmt --all -- --check
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
- name: Build
run: cargo build
- name: Run tests
run: cargo test --verbose --all-targets --all-features
# run-podman-tests:
# runs-on: ubuntu-latest
# needs: [build, build-rust]
# strategy:
# matrix:
# test-path:
# - ../tests/smoke/0001-smoke.zndsl
# - ../tests/0013-db-snapshot.zndsl
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# - name: Setup containers registries
# run: |
# mkdir -p /etc/containers \
# && echo "unqualified-search-registries = ['docker.io']" \
# && sudo tee /etc/containers/registries.conf
# - name: Setup NodeJS
# uses: actions/setup-node@v4
# with:
# node-version: 18.x
# - name: Retrieve build artifacts
# uses: actions/download-artifact@master
# with:
# name: ${{ runner.os }}-build-${{ github.sha }}
# path: ./javascript/packages
# - name: Install dependencies
# run: npm install --ignore-scripts
# working-directory: ./javascript
# - name: Run test
# run: npm run zombie -- --provider podman test ${{ matrix.test-path }}
# working-directory: ./javascript
# env:
# DEBUG: zombie*
# ZOMBIENET_INTEGRATION_TEST_IMAGE: docker.io/paritypr/polkadot-debug:master
# COL_IMAGE: docker.io/paritypr/colander:master
# MALUS_IMAGE: docker.io/paritypr/malus:4131-ccd09bbf
all:
# This dummy job depends on all the mandatory checks. It succeeds if and only if all CI checks
# are successful.
needs: [build, build-rust] #, run-podman-tests]
runs-on: ubuntu-latest
steps:
- run: echo Success