From 1ff58e8ea6ee91ce9f5fe84a187678c0685f226d Mon Sep 17 00:00:00 2001 From: Evgeniy Zayats Date: Tue, 5 Mar 2024 20:37:44 -0500 Subject: [PATCH] .git: update tests workflow to use new dev env Signed-off-by: Evgeniy Zayats --- .github/workflows/run-tests.yml | 133 ++++++++++++++++---------------- 1 file changed, 66 insertions(+), 67 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 729251e73b..5dec7dc121 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: Prepare test environment - id: prepare_test_env + - 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 venv timeout-minutes: 30 run: | - make prepare-test-env - echo "$(pwd)/vendor" >> $GITHUB_PATH - working-directory: neofs-dev-env + make venv.no-dev-env-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.no-dev-env-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.no-dev-env-pytest/bin/activate && pytest --show-capture=no --alluredir=${GITHUB_WORKSPACE}/allure-results pytest_tests/tests working-directory: neofs-testcases - name: Publish to NeoFS