Skip to content

Commit

Permalink
[ci]: pin test
Browse files Browse the repository at this point in the history
Signed-off-by: BAStos525 <[email protected]>
  • Loading branch information
BAStos525 committed Nov 9, 2023
1 parent f5df085 commit cb884c3
Showing 1 changed file with 131 additions and 131 deletions.
262 changes: 131 additions & 131 deletions .github/workflows/iroha2-dev-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2
- uses: Swatinem/rust-cache@v2
- name: Check config.md
if: always()
Expand All @@ -43,133 +43,133 @@ jobs:
if: always()
run: ./scripts/tests/consistency.sh docker-compose

with_coverage:
runs-on: [self-hosted, Linux, iroha2ci]
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
steps:
- uses: actions/checkout@v3
# TODO Remove this step #2165
# - name: Adjust toolchain
# run: |
# rustup component add llvm-tools-preview
- uses: Swatinem/rust-cache@v2
- name: Run tests, with coverage
run: |
mold --run cargo llvm-cov clean --workspace
mold --run cargo llvm-cov --doc --no-report --all-features --workspace --no-fail-fast
mold --run cargo llvm-cov --no-report --ignore-filename-regex main.rs --all-features --workspace --no-fail-fast
- name: Generate lcov report
run: |
# generate report without tests
# https://github.com/taiki-e/cargo-llvm-cov#merge-coverages-generated-under-different-test-conditions
mold --run cargo llvm-cov --doctests --no-run --all-features --workspace --lcov --output-path lcov.info
- name: Upload coverage to coveralls.io
uses: coverallsapp/github-action@v2
with:
file: lcov.info
compare-ref: ${{ github.base_ref }}
compare-sha: ${{ github.event.pull_request.base.sha}}
github-token: ${{ secrets.GITHUB_TOKEN }}
allow-empty: true
fail_ci_if_error: true

integration:
runs-on: [self-hosted, Linux, iroha2ci]
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Run tests, with no-default-features
run: |
mold --run cargo test --test mod --no-default-features -- \
integration:: --skip unstable_network
unstable:
runs-on: [self-hosted, Linux, iroha2ci]
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: mold --run cargo test -p iroha_client --tests --no-default-features unstable_network --quiet

# Run the job to check that the docker containers are properly buildable
pr-generator-build:
# Job will only execute if the head of the pull request is a branch for PR-generator case
if: startsWith(github.head_ref, 'iroha2-pr-deploy/')
runs-on: [self-hosted, Linux, iroha2-dev-push]
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
steps:
- uses: actions/checkout@v3
- name: Login to Soramitsu Harbor
uses: docker/login-action@v2
with:
registry: docker.soramitsu.co.jp
username: ${{ secrets.HARBOR_USERNAME }}
password: ${{ secrets.HARBOR_TOKEN }}
- name: Set up Docker Buildx
id: buildx
if: always()
uses: docker/setup-buildx-action@v2
with:
install: true
- name: Build and push iroha2:dev image
uses: docker/build-push-action@v4
if: always()
with:
push: true
tags: docker.soramitsu.co.jp/iroha2/iroha2:dev-${{ github.event.pull_request.head.sha }}
labels: commit=${{ github.sha }}
build-args: TAG=dev
file: Dockerfile
# This context specification is required
context: .

client-cli-test:
runs-on: [self-hosted, Linux, iroha2ci]
container:
image: hyperledger/iroha2-ci:nightly-2023-06-25
timeout-minutes: 60

steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Build binaries
run: |
cargo build --bin iroha_client_cli
cargo build --bin kagami
cargo build --bin iroha
- name: Mark binaries as executable
run: |
chmod +x $CLIENT_CLI_DIR/
- name: Run Iroha 2 on bare metal
run: |
./scripts/test_env.py setup
- name: Copy Iroha 2 client config
run: |
cp ./configs/client/config.json $CLIENT_CLI_DIR/
- name: Set up .env for client_cli tests
run: |
echo "CLIENT_CLI_DIR=$CLIENT_CLI_DIR" >> ./client_cli/pytests/.env
echo "TORII_API_PORT_MIN=8080" >> ./client_cli/pytests/.env
echo "TORII_API_PORT_MAX=8083" >> ./client_cli/pytests/.env
- name: Install dependencies using Poetry
working-directory: client_cli/pytests
run: |
poetry install
- name: Run client cli tests
working-directory: client_cli/pytests
run: |
poetry run pytest
# with_coverage:
# runs-on: [self-hosted, Linux, iroha2ci]
# container:
# image: hyperledger/iroha2-ci:nightly-2023-06-25
# steps:
# - uses: actions/checkout@v3
# # TODO Remove this step #2165
# # - name: Adjust toolchain
# # run: |
# # rustup component add llvm-tools-preview
# - uses: Swatinem/rust-cache@v2
# - name: Run tests, with coverage
# run: |
# mold --run cargo llvm-cov clean --workspace
# mold --run cargo llvm-cov --doc --no-report --all-features --workspace --no-fail-fast
# mold --run cargo llvm-cov --no-report --ignore-filename-regex main.rs --all-features --workspace --no-fail-fast
# - name: Generate lcov report
# run: |
# # generate report without tests
# # https://github.com/taiki-e/cargo-llvm-cov#merge-coverages-generated-under-different-test-conditions
# mold --run cargo llvm-cov --doctests --no-run --all-features --workspace --lcov --output-path lcov.info
# - name: Upload coverage to coveralls.io
# uses: coverallsapp/github-action@v2
# with:
# file: lcov.info
# compare-ref: ${{ github.base_ref }}
# compare-sha: ${{ github.event.pull_request.base.sha}}
# github-token: ${{ secrets.GITHUB_TOKEN }}
# allow-empty: true
# fail_ci_if_error: true

# integration:
# runs-on: [self-hosted, Linux, iroha2ci]
# container:
# image: hyperledger/iroha2-ci:nightly-2023-06-25
# timeout-minutes: 30
# steps:
# - uses: actions/checkout@v3
# - uses: Swatinem/rust-cache@v2
# - name: Run tests, with no-default-features
# run: |
# mold --run cargo test --test mod --no-default-features -- \
# integration:: --skip unstable_network

# unstable:
# runs-on: [self-hosted, Linux, iroha2ci]
# container:
# image: hyperledger/iroha2-ci:nightly-2023-06-25
# timeout-minutes: 60
# steps:
# - uses: actions/checkout@v3
# - uses: Swatinem/rust-cache@v2
# - name: Run tests
# run: mold --run cargo test -p iroha_client --tests --no-default-features unstable_network --quiet

# # Run the job to check that the docker containers are properly buildable
# pr-generator-build:
# # Job will only execute if the head of the pull request is a branch for PR-generator case
# if: startsWith(github.head_ref, 'iroha2-pr-deploy/')
# runs-on: [self-hosted, Linux, iroha2-dev-push]
# container:
# image: hyperledger/iroha2-ci:nightly-2023-06-25
# steps:
# - uses: actions/checkout@v3
# - name: Login to Soramitsu Harbor
# uses: docker/login-action@v2
# with:
# registry: docker.soramitsu.co.jp
# username: ${{ secrets.HARBOR_USERNAME }}
# password: ${{ secrets.HARBOR_TOKEN }}
# - name: Set up Docker Buildx
# id: buildx
# if: always()
# uses: docker/setup-buildx-action@v2
# with:
# install: true
# - name: Build and push iroha2:dev image
# uses: docker/build-push-action@v4
# if: always()
# with:
# push: true
# tags: docker.soramitsu.co.jp/iroha2/iroha2:dev-${{ github.event.pull_request.head.sha }}
# labels: commit=${{ github.sha }}
# build-args: TAG=dev
# file: Dockerfile
# # This context specification is required
# context: .

# client-cli-test:
# runs-on: [self-hosted, Linux, iroha2ci]
# container:
# image: hyperledger/iroha2-ci:nightly-2023-06-25
# timeout-minutes: 60

# steps:
# - uses: actions/checkout@v3
# - uses: Swatinem/rust-cache@v2
# - name: Build binaries
# run: |
# cargo build --bin iroha_client_cli
# cargo build --bin kagami
# cargo build --bin iroha

# - name: Mark binaries as executable
# run: |
# chmod +x $CLIENT_CLI_DIR/

# - name: Run Iroha 2 on bare metal
# run: |
# ./scripts/test_env.py setup

# - name: Copy Iroha 2 client config
# run: |
# cp ./configs/client/config.json $CLIENT_CLI_DIR/

# - name: Set up .env for client_cli tests
# run: |
# echo "CLIENT_CLI_DIR=$CLIENT_CLI_DIR" >> ./client_cli/pytests/.env
# echo "TORII_API_PORT_MIN=8080" >> ./client_cli/pytests/.env
# echo "TORII_API_PORT_MAX=8083" >> ./client_cli/pytests/.env

# - name: Install dependencies using Poetry
# working-directory: client_cli/pytests
# run: |
# poetry install

# - name: Run client cli tests
# working-directory: client_cli/pytests
# run: |
# poetry run pytest

0 comments on commit cb884c3

Please sign in to comment.