-
Notifications
You must be signed in to change notification settings - Fork 91
118 lines (98 loc) · 3.2 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
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@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
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@v3
- 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@v3
# - 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@v3
# 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