diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 729251e73b..c6e4a5e75b 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -34,17 +34,10 @@ jobs: - name: Checkout neofs-testcases repository uses: actions/checkout@v4 with: - repository: nspcc-dev/neofs-testcases - ref: 'master' + repository: evgeniiz321/neofs-testcases + ref: 'ezayats/drop-old-devenv' path: neofs-testcases - - name: Checkout neofs-dev-env repository - uses: actions/checkout@v4 - with: - repository: nspcc-dev/neofs-dev-env - ref: 'af001f8052a203eab408af2bf3a41c7e5af2ac11' - path: neofs-dev-env - - name: Checkout neofs-node repository uses: actions/checkout@v4 with: @@ -89,7 +82,7 @@ jobs: working-directory: neofs-testcases ################################################################ - - name: Build neofs-node (neofs-cli and neofs-adm) + - name: Build neofs-node timeout-minutes: 5 run: | make all @@ -97,56 +90,78 @@ jobs: 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: Download latest stable neofs-s3-gw + uses: dsaltares/fetch-gh-release-asset@1.1.1 + with: + repo: 'nspcc-dev/neofs-s3-gw' + version: 'tags/v0.29.0' + file: 'neofs-s3-gw-linux-amd64' + target: 'neofs-testcases/neofs-s3-gw' - - name: Build NeoFS Inner Ring docker image - timeout-minutes: 30 - run: | - make image-ir - working-directory: neofs-node + - name: Download latest stable neofs-s3-gw-authmate + uses: dsaltares/fetch-gh-release-asset@1.1.1 + with: + repo: 'nspcc-dev/neofs-s3-gw' + version: 'tags/v0.29.0' + file: 'neofs-s3-authmate-linux-amd64' + target: 'neofs-testcases/neofs-s3-authmate' - - 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: Download latest stable neofs-rest-gw + uses: dsaltares/fetch-gh-release-asset@1.1.1 + with: + repo: 'nspcc-dev/neofs-rest-gw' + version: 'tags/v0.6.0' + file: 'neofs-rest-gw-linux-amd64' + target: 'neofs-testcases/neofs-rest-gw' -################################################################ - - 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: Download latest stable neofs-http-gw + uses: dsaltares/fetch-gh-release-asset@1.1.1 + with: + repo: 'nspcc-dev/neofs-http-gw' + version: 'tags/v0.28.0' + file: 'neofs-http-gw-linux-amd64' + target: 'neofs-testcases/neofs-http-gw' - - 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: Download latest stable neo-go + uses: dsaltares/fetch-gh-release-asset@1.1.1 + with: + repo: 'nspcc-dev/neo-go' + version: 'tags/v0.104.0' + file: 'neo-go-linux-amd64' + target: 'neofs-testcases/neo-go' - - name: Prepare venv + - name: Copy built binaries timeout-minutes: 30 run: | - make venv.local-pytest + ls -la ../neofs-node/bin + cp ../neofs-node/bin/neofs-adm . + cp ../neofs-node/bin/neofs-cli . + cp ../neofs-node/bin/neofs-ir . + cp ../neofs-node/bin/neofs-lens . + cp ../neofs-node/bin/neofs-node . + working-directory: neofs-testcases + + - name: Chmod binaries + run: | + sudo chmod a+x neofs-cli + sudo chmod a+x neofs-adm + sudo chmod a+x neofs-ir + sudo chmod a+x neofs-lens + sudo chmod a+x neofs-node + sudo chmod a+x neofs-rest-gw + sudo chmod a+x neofs-http-gw + sudo chmod a+x neo-go + sudo chmod a+x neofs-s3-authmate + sudo chmod a+x neofs-s3-gw working-directory: neofs-testcases - - name: Prepare test environment - id: prepare_test_env + - name: Prepare venv timeout-minutes: 30 run: | - make prepare-test-env - echo "$(pwd)/vendor" >> $GITHUB_PATH - working-directory: neofs-dev-env + make venv.pytest + echo "$(pwd)" >> $GITHUB_PATH + working-directory: neofs-testcases ################################################################ - name: Log environment @@ -155,18 +170,6 @@ jobs: 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 "==========================================" @@ -196,14 +199,10 @@ jobs: 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 + working-directory: neofs-testcases ################################################################ - name: Run Sanity tests for pull requests @@ -212,7 +211,7 @@ jobs: env: ALLURE_RESULTS_DIR: ${{ env.ALLURE_RESULTS_DIR }} run: | - source venv.local-pytest/bin/activate && pytest --show-capture=no -m "sanity" --alluredir="$ALLURE_RESULTS_DIR" pytest_tests/testsuites + source venv.pytest/bin/activate && pytest --show-capture=no -m "sanity" --alluredir=${GITHUB_WORKSPACE}/allure-results pytest_tests/tests working-directory: neofs-testcases - name: Run all tests for other events @@ -221,7 +220,7 @@ jobs: env: ALLURE_RESULTS_DIR: ${{ env.ALLURE_RESULTS_DIR }} run: | - source venv.local-pytest/bin/activate && pytest --alluredir="$ALLURE_RESULTS_DIR" pytest_tests/testsuites + source venv.pytest/bin/activate && pytest --show-capture=no --alluredir=${GITHUB_WORKSPACE}/allure-results pytest_tests/tests working-directory: neofs-testcases - name: Publish to NeoFS @@ -254,32 +253,3 @@ jobs: state: 'success' sha: ${{github.event.pull_request.head.sha || github.sha}} target_url: ${{ env.REPORT_NEOFS_URL }} - - - name: Post only docker logs - id: post_dockers_logs - if: always() && ( steps.prepare_test_env.outcome != 'success' || steps.put_report.outcome != 'success' ) - env: - TEST_RESULTS_PASSWORD: ${{ secrets.TEST_RESULTS_PASSWORD }} - TEST_RESULTS_NEOFS_NETWORK_DOMAIN: ${{ vars.TEST_RESULTS_NEOFS_NETWORK_DOMAIN }} - TEST_RESULTS_CID: ${{ vars.TEST_RESULTS_CID }} - run: | - source venv.local-pytest/bin/activate && python ./tools/src/zip_dev_env_logs.py - NEOFS_CLI_PASSWORD=$TEST_RESULTS_PASSWORD neofs-cli --rpc-endpoint st1.$TEST_RESULTS_NEOFS_NETWORK_DOMAIN:8080 \ - --wallet wallet.json object put --file containers_logs.zip --cid $TEST_RESULTS_CID --timeout 1200s \ - --expire-at $EXP_EPOCH \ - --attributes FilePath=$RUN_ID/data/containers_logs.zip,RunNumber=$RUN_ID,ContentType=application/zip - working-directory: neofs-testcases - - - name: Post the link to the docker logs - timeout-minutes: 60 - if: always() && ( steps.post_dockers_logs.outcome == 'success' ) - env: - TEST_RESULTS_HTTP_GATE: ${{ vars.TEST_RESULTS_HTTP_GATE }} - TEST_RESULTS_CID: ${{ vars.TEST_RESULTS_CID }} - uses: Sibz/github-status-action@v1 - with: - authToken: ${{secrets.GITHUB_TOKEN}} - context: 'Docker logs' - state: 'success' - sha: ${{github.event.pull_request.head.sha || github.sha}} - target_url: https://${{ env.TEST_RESULTS_HTTP_GATE }}/${{ env.TEST_RESULTS_CID }}/${{ env.RUN_ID }}/data/containers_logs.zip