-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.github: use common system tests workflow
Signed-off-by: Evgeniy Zayats <[email protected]>
- Loading branch information
Evgeniy Zayats
committed
Oct 30, 2024
1 parent
ec7e317
commit ab93869
Showing
1 changed file
with
15 additions
and
239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,244 +31,20 @@ on: | |
|
||
permissions: write-all | ||
|
||
env: | ||
ALLURE_RESULTS_DIR: ${{ github.workspace }}/allure-results | ||
|
||
jobs: | ||
run_system_tests: | ||
runs-on: ${{ matrix.os.runner }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [{runner: 'ubuntu-latest', binary: 'linux-amd64'}, {runner: 'macos-14', binary: 'darwin-arm64'}] | ||
timeout-minutes: 500 | ||
steps: | ||
- name: Checkout neofs-testcases repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: nspcc-dev/neofs-testcases | ||
ref: ${{ github.event.inputs.neofs_testcases_ref }} | ||
path: neofs-testcases | ||
|
||
- name: Checkout neofs-node repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.inputs.neofs_node_ref }} | ||
path: neofs-node | ||
|
||
################################################################# | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
cache: true | ||
go-version: '1.22' | ||
- run: go version | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
- 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: Checkout xk6-neofs repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: nspcc-dev/xk6-neofs | ||
ref: master | ||
path: xk6-neofs | ||
|
||
- name: Build xk6-neofs | ||
timeout-minutes: 5 | ||
run: | | ||
make install_xk6 | ||
make build | ||
working-directory: xk6-neofs | ||
|
||
################################################################ | ||
- name: Build neofs-node | ||
timeout-minutes: 5 | ||
run: | | ||
make all | ||
echo "$(pwd)/bin" >> $GITHUB_PATH | ||
working-directory: neofs-node | ||
|
||
################################################################ | ||
|
||
- name: Download latest stable neofs-s3-gw | ||
uses: dsaltares/[email protected] | ||
with: | ||
repo: 'nspcc-dev/neofs-s3-gw' | ||
version: 'tags/v0.32.0' | ||
file: 'neofs-s3-gw-${{ matrix.os.binary }}' | ||
target: 'neofs-testcases/neofs-s3-gw' | ||
|
||
- name: Download latest stable neofs-s3-authmate | ||
uses: dsaltares/[email protected] | ||
with: | ||
repo: 'nspcc-dev/neofs-s3-gw' | ||
version: 'tags/v0.32.0' | ||
file: 'neofs-s3-authmate-${{ matrix.os.binary }}' | ||
target: 'neofs-testcases/neofs-s3-authmate' | ||
|
||
- name: Download latest stable neofs-rest-gw | ||
uses: dsaltares/[email protected] | ||
with: | ||
repo: 'nspcc-dev/neofs-rest-gw' | ||
version: 'tags/v0.11.0' | ||
file: 'neofs-rest-gw-${{ matrix.os.binary }}' | ||
target: 'neofs-testcases/neofs-rest-gw' | ||
|
||
- name: Download latest stable neo-go | ||
uses: dsaltares/[email protected] | ||
with: | ||
repo: 'nspcc-dev/neo-go' | ||
version: 'tags/v0.106.3' | ||
file: 'neo-go-${{ matrix.os.binary }}' | ||
target: 'neofs-testcases/neo-go' | ||
|
||
- name: Copy built binaries | ||
timeout-minutes: 30 | ||
run: | | ||
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 neo-go | ||
sudo chmod a+x neofs-s3-authmate | ||
sudo chmod a+x neofs-s3-gw | ||
working-directory: neofs-testcases | ||
|
||
- name: Prepare venv | ||
id: prepare_venv | ||
timeout-minutes: 30 | ||
run: | | ||
make venv.pytest | ||
echo "$(pwd)" >> $GITHUB_PATH | ||
working-directory: neofs-testcases | ||
|
||
################################################################ | ||
- name: Log environment | ||
run: | | ||
echo "Check free space" | ||
df -h | ||
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 bin dir" | ||
ls -lah "${GITHUB_WORKSPACE}/neofs-node/bin" | ||
echo "==========================================" | ||
working-directory: neofs-testcases | ||
|
||
################################################################ | ||
- name: Run sanity tests | ||
timeout-minutes: 120 | ||
if: ${{ !github.event.inputs.run_all_tests && github.event_name == 'pull_request' }} | ||
env: | ||
ALLURE_RESULTS_DIR: ${{ env.ALLURE_RESULTS_DIR }} | ||
run: | | ||
source venv.pytest/bin/activate && pytest -n 3 --show-capture=no -m "sanity" --alluredir=${GITHUB_WORKSPACE}/allure-results pytest_tests/tests | ||
working-directory: neofs-testcases | ||
|
||
- name: Run all tests | ||
timeout-minutes: 480 | ||
if: ${{ github.event.inputs.run_all_tests || github.event_name != 'pull_request' }} | ||
env: | ||
ALLURE_RESULTS_DIR: ${{ env.ALLURE_RESULTS_DIR }} | ||
run: | | ||
source venv.pytest/bin/activate && pytest -n 3 --show-capture=no --alluredir=${GITHUB_WORKSPACE}/allure-results pytest_tests/tests | ||
working-directory: neofs-testcases | ||
|
||
- name: Publish to NeoFS | ||
id: put_report | ||
if: always() && steps.prepare_venv.outcome == 'success' | ||
uses: nspcc-dev/[email protected] | ||
with: | ||
NEOFS_WALLET: ${{ secrets.TEST_RESULTS_WALLET }} | ||
NEOFS_WALLET_PASSWORD: ${{ secrets.TEST_RESULTS_PASSWORD }} | ||
NEOFS_NETWORK_DOMAIN: ${{ vars.TEST_RESULTS_NEOFS_NETWORK_DOMAIN }} | ||
NEOFS_HTTP_GATE: ${{ vars.TEST_RESULTS_HTTP_GATE }} | ||
STORE_OBJECTS_CID: ${{ vars.TEST_RESULTS_CID }} | ||
PR_LIFETIME: ${{ vars.PR_EXPIRATION_PERIOD }} | ||
MASTER_LIFETIME: ${{ vars.MASTER_EXPIRATION_PERIOD }} | ||
MANUAL_RUN_LIFETIME: ${{ vars.MANUAL_RUN_EXPIRATION_PERIOD }} | ||
OTHER_LIFETIME: ${{ vars.OTHER_EXPIRATION_PERIOD }} | ||
ALLURE_RESULTS_DIR: ${{ env.ALLURE_RESULTS_DIR }} | ||
ALLURE_GENERATED_DIR: 'neofs-test-allure-generated-report' | ||
|
||
- name: Post the link to the report | ||
id: post_report_link | ||
timeout-minutes: 60 | ||
if: always() && steps.put_report.outcome == 'success' | ||
env: | ||
REPORT_NEOFS_URL: ${{ steps.put_report.outputs.REPORT_NEOFS_URL }}index.html | ||
uses: Sibz/github-status-action@v1 | ||
with: | ||
authToken: ${{secrets.GITHUB_TOKEN}} | ||
context: 'Test report ${{ matrix.os.runner }}' | ||
state: 'success' | ||
sha: ${{github.event.pull_request.head.sha || github.sha}} | ||
target_url: ${{ env.REPORT_NEOFS_URL }} | ||
uses: nspcc-dev/neofs-testcases/.github/workflows/system-tests.yml@master | ||
with: | ||
neofs_network_domain: ${{ vars.TEST_RESULTS_NEOFS_NETWORK_DOMAIN }} | ||
neofs_http_gate: ${{ vars.TEST_RESULTS_HTTP_GATE }} | ||
neofs_store_objects_cid: ${{ vars.TEST_RESULTS_CID }} | ||
neofs_pr_expiration_period: ${{ vars.PR_EXPIRATION_PERIOD }} | ||
neofs_master_expiration_period: ${{ vars.MASTER_EXPIRATION_PERIOD }} | ||
neofs_manual_expiration_period: ${{ vars.MANUAL_RUN_EXPIRATION_PERIOD }} | ||
neofs_other_expiration_period: ${{ vars.OTHER_EXPIRATION_PERIOD }} | ||
neofs_testcases_commit: ${{ github.event.inputs.neofs_testcases_ref }} | ||
neofs_node_commit: ${{ github.event.inputs.neofs_node_ref }} | ||
marks: ${{ !github.event.inputs.run_all_tests && github.event_name == 'pull_request' && 'sanity' || '' }} | ||
tests_parallel_level: 3 | ||
os: '[{runner: "ubuntu-latest", binary: "linux-amd64"}, {runner: "macos-14", binary: "darwin-arm64"}]' | ||
secrets: inherit |