From e9fae2d92f135d5c97738990d6610b92769b8786 Mon Sep 17 00:00:00 2001 From: Oleg Kulachenko Date: Fri, 28 Jul 2023 19:38:14 +0400 Subject: [PATCH 1/3] Change neofs-dev-env ref Until https://github.com/nspcc-dev/neofs-dev-env/pull/272 is merged, the ref should change to a temporary branch. Signed-off-by: Oleg Kulachenko --- .github/workflows/run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index ea4a47f504..cde7b25475 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -39,7 +39,7 @@ jobs: uses: actions/checkout@v3 with: repository: nspcc-dev/neofs-dev-env - ref: 'master' + ref: 'feat/make-health-check-not-depend-on-shell' path: neofs-dev-env - name: Checkout neofs-node repository From 4aca2663e88fd422d13de85a9568c5a352b3b442 Mon Sep 17 00:00:00 2001 From: Oleg Kulachenko Date: Sat, 3 Jun 2023 20:29:56 +0400 Subject: [PATCH 2/3] workflow: Add a deploying Allure reports to NeoFS #2324 https://github.com/nspcc-dev/neofs-testcases/issues/574 Added a workflow for deploy Allure tests result as static web page to NeoFS. This new functionality will help to save any test report as an object in the NeoFS network, we will become independent of the limitations of the GitHub branches and pages. It will also be an "advertisement" for our object storage. Signed-off-by: Oleg Kulachenko --- .github/workflows/run-tests.yml | 76 +++++++++++++++++++++++---------- 1 file changed, 54 insertions(+), 22 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index cde7b25475..1d6faf5a34 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -27,7 +27,20 @@ jobs: run_system_tests: runs-on: ubuntu-latest timeout-minutes: 500 + env: + TEST_RESULTS_PASSWORD: ${{ secrets.TEST_RESULTS_PASSWORD }} + TEST_RESULTS_WALLET: ${{ secrets.TEST_RESULTS_WALLET }} + TEST_RESULTS_NEOFS_NETWORK_DOMAIN: "fs.neo.org" steps: + - name: Get the current date + id: date + run: echo "::set-output name=timestamp::$(date +%s)" + + - name: Set RUN_ID + env: + TIMESTAMP: ${{ steps.date.outputs.timestamp }} + run: echo "RUN_ID=${{ github.run_number }}-$TIMESTAMP" >> $GITHUB_ENV + - name: Checkout neofs-testcases repository uses: actions/checkout@v3 with: @@ -47,7 +60,21 @@ jobs: with: path: neofs-node -################################################################ + - name: Download latest stable neofs-cli for uploading reports to NeoFS + uses: dsaltares/fetch-gh-release-asset@1.1.1 + with: + repo: 'nspcc-dev/neofs-node' + version: 'tags/v0.37.0' + file: 'neofs-cli-amd64' + target: 'neofs-node-stable/neofs-cli' + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Chmod latest stable neofs-cli + run: | + sudo chmod a+x neofs-cli + working-directory: neofs-node-stable + +################################################################# - name: Set up Go uses: actions/setup-go@v4 with: @@ -217,36 +244,41 @@ jobs: working-directory: neofs-testcases ################################################################ - - name: Get Allure history - timeout-minutes: 60 - uses: actions/checkout@v3 - if: always() - with: - ref: gh-pages - path: gh-pages - - - name: Allure Report action from marketplace + - name: Generate Allure report timeout-minutes: 60 uses: simple-elf/allure-report-action@v1.6 if: always() id: allure-report with: - keep_reports: 200 + keep_reports: 100000 allure_results: allure-results allure_report: allure-report - gh_pages: gh-pages allure_history: allure-history - - name: Deploy report to Github Pages - timeout-minutes: 120 + - name: Remove testing neofs-cli if: always() - uses: peaceiris/actions-gh-pages@v3.9.3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_branch: gh-pages - publish_dir: allure-history - force_orphan: true - enable_jekyll: true + run: | + make clean + working-directory: neofs-node + + - name: Enable stable neofs-cli + if: always() + run: | + echo "$(pwd)" >> $GITHUB_PATH + working-directory: neofs-node-stable + + - name: Create wallet + if: always() + run: | + echo "$TEST_RESULTS_WALLET" | base64 -d > wallet.json + working-directory: neofs-testcases + + - name: Put allure report to NeoFS + if: always() + run: | + sudo chmod -R a+rw ${GITHUB_WORKSPACE}/allure-report + source venv.local-pytest/bin/activate && python ./tools/src/process-allure-reports.py --neofs_domain $TEST_RESULTS_NEOFS_NETWORK_DOMAIN --run_id $RUN_ID --cid $TEST_RESULTS_CID --allure_report ${GITHUB_WORKSPACE}/allure-report --wallet wallet.json + working-directory: neofs-testcases - name: Post the link to the report timeout-minutes: 60 @@ -257,4 +289,4 @@ jobs: context: 'Test report' state: 'success' sha: ${{github.event.pull_request.head.sha || github.sha}} - target_url: https://${{ github.repository_owner }}.github.io/neofs-node/${{ github.run_number }} + target_url: https://http.${{ env.TEST_RESULTS_NEOFS_NETWORK_DOMAIN }}/${{ env.TEST_RESULTS_CID }}/${{ env.RUN_ID }}/index.html From f76497f0280be9248bee96c370ac7bc34007d7ce Mon Sep 17 00:00:00 2001 From: Oleg Kulachenko Date: Fri, 28 Jul 2023 20:09:40 +0400 Subject: [PATCH 3/3] Tst Signed-off-by: Oleg Kulachenko --- .github/workflows/run-tests.yml | 242 +------------------------------- 1 file changed, 1 insertion(+), 241 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 1d6faf5a34..03e9cb80cb 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -31,248 +31,8 @@ jobs: TEST_RESULTS_PASSWORD: ${{ secrets.TEST_RESULTS_PASSWORD }} TEST_RESULTS_WALLET: ${{ secrets.TEST_RESULTS_WALLET }} TEST_RESULTS_NEOFS_NETWORK_DOMAIN: "fs.neo.org" + TEST_RESULTS_CID: ${{ vars.TEST_RESULTS_CID }} steps: - - name: Get the current date - id: date - run: echo "::set-output name=timestamp::$(date +%s)" - - - name: Set RUN_ID - env: - TIMESTAMP: ${{ steps.date.outputs.timestamp }} - run: echo "RUN_ID=${{ github.run_number }}-$TIMESTAMP" >> $GITHUB_ENV - - - name: Checkout neofs-testcases repository - uses: actions/checkout@v3 - with: - repository: nspcc-dev/neofs-testcases - ref: 'master' - path: neofs-testcases - - - name: Checkout neofs-dev-env repository - uses: actions/checkout@v3 - with: - repository: nspcc-dev/neofs-dev-env - ref: 'feat/make-health-check-not-depend-on-shell' - path: neofs-dev-env - - - name: Checkout neofs-node repository - uses: actions/checkout@v3 - with: - path: neofs-node - - - name: Download latest stable neofs-cli for uploading reports to NeoFS - uses: dsaltares/fetch-gh-release-asset@1.1.1 - with: - repo: 'nspcc-dev/neofs-node' - version: 'tags/v0.37.0' - file: 'neofs-cli-amd64' - target: 'neofs-node-stable/neofs-cli' - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Chmod latest stable neofs-cli - run: | - sudo chmod a+x neofs-cli - working-directory: neofs-node-stable - -################################################################# - - name: Set up Go - uses: actions/setup-go@v4 - with: - cache: true - go-version: '1.20' - - run: go version - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.10.11' - - run: python --version - -# Hashlib uses OpenSSL for ripemd160 and apparently OpenSSL disabled some older crypto algos around version 3.0 -# in November 2021. All the functions are still there but require manual enabling. -# See https://github.com/openssl/openssl/issues/16994 -# But we use ripemd160 for tests. -# For ripemd160 to be supported, we need the openssl configuration file to contain the following lines: -# openssl_conf = openssl_init -# -# [openssl_init] -# providers = provider_sect -# -# [provider_sect] -# default = default_sect -# legacy = legacy_sect -# -# [default_sect] -# activate = 1 -# -# [legacy_sect] -# activate = 1 - - name: Fix OpenSSL ripemd160 - run: | - sudo python ./tools/src/openssl_config_fix.py - working-directory: neofs-testcases - -################################################################ - - name: Build neofs-node (neofs-cli and neofs-adm) - timeout-minutes: 5 - run: | - make all - echo "$(pwd)/bin" >> $GITHUB_PATH - working-directory: neofs-node - -################################################################ - - name: Get TAG for docker images - run: | - echo "CURRENT_TAG=$( make version | sed 's/^v//' )" >> $GITHUB_ENV - working-directory: neofs-node - - - name: Build NeoFS storage docker image - timeout-minutes: 30 - run: | - make image-storage - working-directory: neofs-node - - - name: Build NeoFS Inner Ring docker image - timeout-minutes: 30 - run: | - make image-ir - working-directory: neofs-node - - - name: Add NeoFS storage and NeoFS ir docker TAGs to testcases-env config file - run: | - sed -i "s/NODE_VERSION=.*/NODE_VERSION=${{ env.CURRENT_TAG }}/g" .github/testcases-env - sed -i "s/IR_VERSION=.*/IR_VERSION=${{ env.CURRENT_TAG }}/g" .github/testcases-env - working-directory: neofs-node - -################################################################ - - name: Copy testcases-env file to testcases-env in neofs-dev-env - run: | - cp .github/testcases-env ${GITHUB_WORKSPACE}/neofs-dev-env/.env - working-directory: neofs-node - - - name: Prepare hosts - timeout-minutes: 5 - run: | - make get - sudo ./bin/update_hosts.sh - sudo chmod a+w vendor/hosts - working-directory: neofs-dev-env - - - name: Prepare test environment - timeout-minutes: 30 - run: | - make prepare-test-env - echo "$(pwd)/vendor" >> $GITHUB_PATH - working-directory: neofs-dev-env - -################################################################ - - name: Log environment - run: | - echo "Check free space" - df -h - echo "==========================================" - - echo "Check /etc/hosts" - cat /etc/hosts - echo "==========================================" - - echo "Check docker images" - docker images - echo "==========================================" - - echo "Check docker ps" - docker ps - echo "==========================================" - - echo "Check neo-go version" - neo-go --version - echo "==========================================" - - echo "Check neofs-s3-authmate version" - neofs-s3-authmate --version - echo "==========================================" - - echo "Check neofs-s3-gw version" - echo "==========================================" - neofs-s3-gw --version - echo "==========================================" - - echo "Check neofs-adm version" - neofs-adm --version - echo "==========================================" - - echo "Check neofs-ir version" - neofs-ir --version - echo "==========================================" - - echo "Check neofs-lens version" - neofs-lens --version - echo "==========================================" - - echo "Check neofs-cli version" - neofs-cli --version - echo "==========================================" - - echo "Check vendor dir" - ls -lah "${GITHUB_WORKSPACE}/neofs-dev-env/vendor" - echo "==========================================" - - echo "Check bin dir" - ls -lah "${GITHUB_WORKSPACE}/neofs-node/bin" - echo "==========================================" - working-directory: neofs-dev-env - -################################################################ - - name: Prepare venv - timeout-minutes: 30 - run: | - make venv.local-pytest - working-directory: neofs-testcases - - - name: Run Sanity tests for pull requests - timeout-minutes: 120 - if: github.event_name == 'pull_request' - run: | - source venv.local-pytest/bin/activate && pytest --show-capture=no -m "sanity" --alluredir=${GITHUB_WORKSPACE}/allure-results pytest_tests/testsuites - working-directory: neofs-testcases - - - name: Run all tests for other events - timeout-minutes: 480 - if: github.event_name != 'pull_request' - run: | - source venv.local-pytest/bin/activate && pytest --alluredir=${GITHUB_WORKSPACE}/allure-results pytest_tests/testsuites - working-directory: neofs-testcases - -################################################################ - - name: Generate Allure report - timeout-minutes: 60 - uses: simple-elf/allure-report-action@v1.6 - if: always() - id: allure-report - with: - keep_reports: 100000 - allure_results: allure-results - allure_report: allure-report - allure_history: allure-history - - - name: Remove testing neofs-cli - if: always() - run: | - make clean - working-directory: neofs-node - - - name: Enable stable neofs-cli - if: always() - run: | - echo "$(pwd)" >> $GITHUB_PATH - working-directory: neofs-node-stable - - - name: Create wallet - if: always() - run: | - echo "$TEST_RESULTS_WALLET" | base64 -d > wallet.json - working-directory: neofs-testcases - - name: Put allure report to NeoFS if: always() run: |