Skip to content

Commit

Permalink
Port the integration test workflow to GitHub Actions (#1376)
Browse files Browse the repository at this point in the history
* Add Integration Test workflow

Signed-off-by: CaptainIRS <36656347+CaptainIRS@users.noreply.github.com>

* Add back package-lock to .gitignore (as of now)

Signed-off-by: CaptainIRS <36656347+CaptainIRS@users.noreply.github.com>

* Add badge in README

Signed-off-by: CaptainIRS <36656347+CaptainIRS@users.noreply.github.com>

* Split integration tests into jobs

Signed-off-by: CaptainIRS <36656347+CaptainIRS@users.noreply.github.com>

* Move tests to same file and introduce dependency

Signed-off-by: CaptainIRS <36656347+CaptainIRS@users.noreply.github.com>

* Remove unnecessary badge

Signed-off-by: CaptainIRS <36656347+CaptainIRS@users.noreply.github.com>
  • Loading branch information
CaptainIRS committed Jun 21, 2022
1 parent 5b96845 commit 2a3839f
Show file tree
Hide file tree
Showing 4 changed files with 124 additions and 31 deletions.
121 changes: 121 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: Tests

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Check correct usage of Caliper package names
run: ./scripts/check-package-names.sh
- name: Install project dependencies
run: npm install
- name: Bootstrap lerna
run: npm run bootstrap
- name: Check the version consistency of subpackages
run: ./packages/caliper-publish/publish.js version check
- name: Run unit tests
run: npm test

fabric-integration-tests:
name: Fabric Integration Tests
runs-on: ubuntu-latest
needs: unit-tests
strategy:
matrix:
node-version: [14.x, 16.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Fabric Integration Test
run: .build/benchmark-integration-test-direct.sh
env:
BENCHMARK: fabric

ethereum-integration-tests:
name: Ethereum Integration Tests
runs-on: ubuntu-latest
needs: unit-tests
strategy:
matrix:
node-version: [14.x, 16.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Ethereum Integration Test
run: .build/benchmark-integration-test-direct.sh
env:
BENCHMARK: ethereum

besu-integration-tests:
name: Besu Integration Tests
runs-on: ubuntu-latest
needs: unit-tests
strategy:
matrix:
node-version: [14.x, 16.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Besu Integration Test
run: .build/benchmark-integration-test-direct.sh
env:
BENCHMARK: besu

fisco-bcos-integration-tests:
name: FISCO BCOS Integration Tests
runs-on: ubuntu-latest
needs: unit-tests
strategy:
matrix:
node-version: [14.x, 16.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: FISCO BCOS Integration Test
run: .build/benchmark-integration-test-direct.sh
env:
BENCHMARK: fisco-bcos

generator-integration-tests:
name: Generator Integration Tests
runs-on: ubuntu-latest
needs: unit-tests
strategy:
matrix:
node-version: [14.x, 16.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Generator Integration Test
run: .build/benchmark-integration-test-direct.sh
env:
BENCHMARK: generator
30 changes: 0 additions & 30 deletions .github/workflows/unit-tests.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ architecture.pptx
output.log
lerna-debug.log

**/package-lock.json

.idea/
**/node_modules/
**/log/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ![Hyperledger Caliper](https://wiki.hyperledger.org/download/attachments/2392434/Hyperledger_Caliper_Logo_Color.svg?version=1&modificationDate=1548883186000&api=v2)

[![Build Status](https://dev.azure.com/Hyperledger/Caliper/_apis/build/status/Caliper?branchName=main)](https://dev.azure.com/Hyperledger/Caliper/_build/latest?definitionId=33&branchName=main)
[![Unit Tests](https://github.com/hyperledger/caliper/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/hyperledger/caliper/actions/workflows/unit-tests.yml)
[![Tests](https://github.com/hyperledger/caliper/actions/workflows/tests.yml/badge.svg)](https://github.com/hyperledger/caliper/actions/workflows/tests.yml)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/2381/badge)](https://bestpractices.coreinfrastructure.org/projects/2381)
[![license](https://img.shields.io/badge/license-Apache%202.0-blue)](https://github.com/hyperledger/caliper/blob/main/LICENSE)
[![node (scoped)](https://img.shields.io/node/v/@hyperledger/caliper-cli)](https://www.npmjs.com/package/@hyperledger/caliper-cli)
Expand Down

0 comments on commit 2a3839f

Please sign in to comment.