Skip to content

[BACKPORT] #4390: include trigger id in trigger entrypoint #145

[BACKPORT] #4390: include trigger id in trigger entrypoint

[BACKPORT] #4390: include trigger id in trigger entrypoint #145

name: I2::Release::Tests
on:
pull_request:
branches: [ iroha2-stable, iroha2-lts ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
cli:
runs-on: ubuntu-latest #[self-hosted, Linux]
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
steps:
- name: Maximize build space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Build iroha
working-directory: cli
run: mold --run cargo build
- name: Build iroha_client_cli
working-directory: client_cli
run: mold --run cargo build
- name: Build kagami
working-directory: tools/kagami
run: mold --run cargo build
- name: Mark binaries as executable
run: |
chmod +x target/debug/iroha
chmod +x target/debug/iroha_client_cli
chmod +x target/debug/kagami
- name: Setup test environment
run: python3 './scripts/test_env.py setup'
- name: Genesis test
run: bash -c './scripts/tests/genesis.sh || (cat test/peers/iroha0/.log; false )'
- name: Basic register and mint
if: always()
run: bash -c './scripts/tests/register_mint_quantity.sh || (cat test/peers/iroha0/.log; false )'
- name: Cleanup test environment
run: python3 './scripts/test_env.py cleanup'
- name: Panic on invalid genesis test
run: bash -c './scripts/tests/panic_on_invalid_genesis.sh'
bench:
runs-on: ubuntu-latest #[self-hosted, Linux]
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
steps:
- name: Maximize build space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Run benchmarks
run: mold --run cargo bench --workspace --quiet
# ------------------------------ SDK tests go here ------------------------
java-api:
runs-on: ubuntu-latest #[self-hosted, Linux]
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
steps:
- name: Maximize build space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/[email protected]
with:
java-version: '11'
distribution: 'temurin'
- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build iroha
working-directory: cli
run: mold --run cargo build
- name: Build iroha_client_cli
working-directory: client_cli
run: mold --run cargo build
- name: Build kagami
working-directory: tools/kagami
run: mold --run cargo build
- name: Mark binaries as executable
run: |
chmod +x target/debug/iroha
chmod +x target/debug/iroha_client_cli
chmod +x target/debug/kagami
- name: Setup test environment
run: ./scripts/test_env.py setup
- name: Test iroha2-java API
run: ./scripts/API/java.sh setup && ./scripts/API/java.sh run
- name: Cleanup test iroha2-java API
run: ./scripts/API/java.sh cleanup
- name: Cleanup test environment
run: ./scripts/test_env.py cleanup
- name: Cleanup Gradle Cache
# Remove some files from the Gradle cache, so they aren't
# cached by GitHub Actions. Restoring these files from a
# GitHub Actions cache might cause problems for future builds.
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
long:
runs-on: ubuntu-latest #[self-hosted, Linux]
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
steps:
- name: Maximize build space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v4
- name: Run long tests
run: mold --run cargo test --workspace --no-fail-fast -- --ignored --test-threads=1 long