git.delta.rocks / unique-network / refs/commits / 5b4393fae750

difftreelog

Splited single file into two files targeted to specified branch.

Alexander Aksenov2022-08-02parent: #de851a4.patch.diff
in: master

2 files changed

added.github/workflows/build-test-master.ymldiffbeforeafterboth

no changes

modified.github/workflows/node_build_test.ymldiffbeforeafterboth
126 run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" down126 run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" down
127
128
129name: Build & test Master
130
131# Controls when the action will run.
132on:
133 # Triggers the workflow on push or pull request events but only for the master branch
134 #push:
135 # branches: [ develop ]
136 pull_request:
137 branches:
138 - master
139 types:
140 - opened
141 - edited
142 - reopened
143 # pull_request:
144 # branches: [ develop ]
145 # Allows you to run this workflow manually from the Actions tab
146 workflow_dispatch:
147
148#Define Workflow variables
149env:
150 ubuntu_version: focal
151 chains_release_dir: /opt/runner/chains_release
152 opal_chain_workdir: ./src_opal_chain
153 quartz_chain_workdir: ./src_quartz_chain
154 unique_chain_workdir: ./src_unique_chain
155 RUST_TOOLCHAIN: nightly-2022-05-11
156 REPO_URL: ${{ github.server_url }}/${{ github.repository }}
157
158# A workflow run is made up of one or more jobs that can run sequentially or in parallel
159jobs:
160 pre-requisites:
161 # The type of runner that the job will run on
162 runs-on: self-hosted-ci
163
164 steps:
165 #runs ssh connection
166 - name: Install dependencies
167 run: |
168 sudo apt-get install git curl libssl-dev llvm pkg-config libclang-dev clang make cmake
169 sudo apt autoremove
170 curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none
171 . $HOME/.cargo/env && cargo install --locked --git https://github.com/chevdor/subwasm
172 rustup toolchain install ${{ env.RUST_TOOLCHAIN }}
173 rustup default ${{ env.RUST_TOOLCHAIN }}
174 rustup target add wasm32-unknown-unknown --toolchain ${{ env.RUST_TOOLCHAIN }}
175
176
177 build:
178 # The type of runner that the job will run on
179 runs-on: self-hosted-ci
180
181 needs: pre-requisites
182 name: Build Container, Spin it Up an test
183
184 continue-on-error: true #Do not stop testing of matrix runs failed.
185
186 strategy:
187 matrix:
188 include:
189 - network: "Opal"
190 features: " "
191 - network: "Quartz"
192 features: "--features=quartz-runtime"
193 - network: "Unique"
194 features: "--features=unique-runtime"
195
196 steps:
197 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
198 - uses: actions/checkout@v3
199
200 - name: Generate ENV related extend file for docker-compose
201 uses: cuchi/jinja2-action@v1.2.0
202 with:
203 template: .docker/docker-compose.tmp.j2
204 output_file: .docker/docker-compose.${{ matrix.network }}.yml
205 variables: |
206 REPO_URL=${{ github.server_url }}/${{ github.repository }}.git
207 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
208 FEATURE=${{ matrix.features }}
209 BRANCH=${{ github.head_ref }}
210
211 - name: Show temporary file
212 run: cat .docker/docker-compose.${{ matrix.network }}.yml
213
214 - name: Build the stack
215 run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build
216
217# - name: "Build the Docker image with Feature: ${{ env.features }}"
218# run: docker build -t build-${{ github.head_ref }} --file .docker/Dockerfile-chain-dev --build-arg REPO_URL=${{ github.server_url }}/${{ github.repository }}.git --build-arg RUST_TOOLCHAIN=${{ env.actual_toolchain }} --build-arg FEATURE="${{ env.features }}" --build-arg BRANCH=${{ github.head_ref }} --no-cache .
219
220 - name: Wait
221 run: sleep 420s
222
223 - name: Install node
224 uses: actions/setup-node@v1
225 with:
226 node-version: 14.x
227
228 - name: Install dependencies
229 run: |
230 cd tests
231 yarn install
232 yarn add mochawesome
233 yarn --pure-lockfile
234
235 - name: Run tests
236 run: |
237 cd tests
238 NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}
239 env:
240 RPC_URL: http://127.0.0.1:9933/
241
242 - name: Test Report
243 uses: phoenix-actions/test-reporting@v8
244 id: test-report # Set ID reference for step
245 if: success() || failure() # run this step even if previous step failed
246 with:
247 name: Tests ${{ matrix.network }} # Name of the check run which will be created
248 path: tests/mochawesome-report/test-*.json # Path to test results
249 reporter: mochawesome-json
250 fail-on-error: 'false'
251
252 - name: Stop running containers
253 if: always() # run this step always
254 run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" down
255127