Skip to content

refactor: Use SystemTime for timestamps #8942

refactor: Use SystemTime for timestamps

refactor: Use SystemTime for timestamps #8942

name: I2::Dev::Static
on:
pull_request:
branches: [main]
paths:
- '**.rs'
- '**.json'
- '**.toml'
- '.github/workflows/iroha2-dev-pr-static.yml'
- 'client_cli/pytests/**/*.py'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
RUSTUP_TOOLCHAIN: nightly-2024-04-18
DOCKER_COMPOSE_PATH: defaults
jobs:
build_executor:
runs-on: ubuntu-latest
container:
image: hyperledger/iroha2-ci:nightly-2024-04-18
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Build iroha executor
run: cargo run --bin iroha_wasm_builder -- build ./wasm_samples/default_executor --optimize --out-file ${{ env.DOCKER_COMPOSE_PATH }}/executor.wasm
- name: Upload executor to reuse in other jobs
uses: actions/upload-artifact@v4
with:
name: executor.wasm
path: ${{ env.DOCKER_COMPOSE_PATH }}/executor.wasm
retention-days: 1
smart_contracts_analysis:
runs-on: ubuntu-latest
needs: build_executor
container:
image: hyperledger/iroha2-ci:nightly-2024-04-18
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Download executor.wasm file
uses: actions/download-artifact@v4
with:
name: executor.wasm
path: ${{ env.DOCKER_COMPOSE_PATH }}
- name: Default executor format
run: |
cd ./wasm_samples/default_executor
mold --run cargo fmt --all -- --check
- name: Integration tests smart contracts format
run: |
cd ./wasm_samples
mold --run cargo fmt --all -- --check
python_static_analysis:
runs-on: ubuntu-latest
container:
image: hyperledger/iroha2-ci:nightly-2024-04-18
steps:
- uses: actions/checkout@v4
- name: Install dependencies using Poetry for client_cli/pytests
working-directory: client_cli/pytests
run: |
poetry lock --no-update
poetry install
- name: Install dependencies using Poetry for torii/pytests
working-directory: torii/pytests
run: |
poetry lock --no-update
poetry install
- name: Check code formatting with Black in client_cli/pytests
working-directory: client_cli/pytests
run: |
poetry run black --check .
- name: Check code formatting with Black in torii/pytests
working-directory: torii/pytests
run: |
poetry run black --check .
- name: Run mypy (Type Checker) in client_cli/pytests
working-directory: client_cli/pytests
run: |
poetry run mypy --explicit-package-bases --ignore-missing-imports .
- name: Run mypy (Type Checker) in torii/pytests
working-directory: torii/pytests
run: |
poetry run mypy --explicit-package-bases --ignore-missing-imports .
- name: Run flake8 (Linter) in client_cli/pytests
working-directory: client_cli/pytests
run: |
poetry run flake8 . --max-line-length=110 --ignore=F401,W503,E203
- name: Run flake8 (Linter) in torii/pytests
working-directory: torii/pytests
run: |
poetry run flake8 . --max-line-length=110 --ignore=F401,W503,E203