-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add github workflow to validate tests from new dynamic env
Signed-off-by: Evgeniy Zayats <[email protected]>
- Loading branch information
Evgeniy Zayats
committed
Dec 22, 2023
1 parent
665249e
commit 909c945
Showing
1 changed file
with
250 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,250 @@ | ||
name: Run automated system tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
- support/** | ||
types: [opened, synchronize] | ||
paths-ignore: | ||
- '**/*.md' | ||
release: | ||
types: | ||
- published | ||
workflow_dispatch: | ||
inputs: | ||
neofs_testcases_ref: | ||
description: 'neofs-testcases ref. Default ref - latest master. Examples: v0.36.0, 8fdcc6d7e798e6511be8806b81894622e72d7fdc, branch_name' | ||
required: false | ||
default: '' | ||
|
||
permissions: write-all | ||
|
||
jobs: | ||
run_system_tests: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 500 | ||
steps: | ||
- name: Get the current date | ||
id: date | ||
run: echo "timestamp=$(date +%s)" >> $GITHUB_OUTPUT | ||
|
||
- 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@v4 | ||
with: | ||
path: neofs-testcases | ||
|
||
- name: Download latest stable neofs-cli | ||
uses: dsaltares/[email protected] | ||
with: | ||
repo: 'nspcc-dev/neofs-node' | ||
version: 'tags/v0.39.2' | ||
file: 'neofs-cli-amd64' | ||
target: 'neofs-testcases/neofs-cli' | ||
|
||
- name: Download latest stable neofs-adm | ||
uses: dsaltares/[email protected] | ||
with: | ||
repo: 'nspcc-dev/neofs-node' | ||
version: 'tags/v0.39.2' | ||
file: 'neofs-adm-amd64' | ||
target: 'neofs-testcases/neofs-adm' | ||
|
||
- name: Download latest stable neofs-ir | ||
uses: dsaltares/[email protected] | ||
with: | ||
repo: 'nspcc-dev/neofs-node' | ||
version: 'tags/v0.39.2' | ||
file: 'neofs-ir-amd64' | ||
target: 'neofs-testcases/neofs-ir' | ||
|
||
- name: Download latest stable neofs-lens | ||
uses: dsaltares/[email protected] | ||
with: | ||
repo: 'nspcc-dev/neofs-node' | ||
version: 'tags/v0.39.2' | ||
file: 'neofs-lens-amd64' | ||
target: 'neofs-testcases/neofs-lens' | ||
|
||
- name: Download latest stable neofs-node | ||
uses: dsaltares/[email protected] | ||
with: | ||
repo: 'nspcc-dev/neofs-node' | ||
version: 'tags/v0.39.2' | ||
file: 'neofs-node-amd64' | ||
target: 'neofs-testcases/neofs-node' | ||
|
||
- name: Checkout neofs-s3-gw repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: nspcc-dev/neofs-s3-gw | ||
ref: '014a5bf493d00b8cce478e2c96c84ad9de8fe617' | ||
path: neofs-s3-gw | ||
|
||
- name: Download latest stable neofs-rest-gw | ||
uses: dsaltares/[email protected] | ||
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: Download latest stable neofs-http-gw | ||
uses: dsaltares/[email protected] | ||
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: Download latest stable neo-go | ||
uses: dsaltares/[email protected] | ||
with: | ||
repo: 'nspcc-dev/neo-go' | ||
version: 'tags/v0.104.0' | ||
file: 'neo-go-linux-amd64' | ||
target: 'neofs-testcases/neo-go' | ||
|
||
- name: Chmod latest stable 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 | ||
working-directory: neofs-testcases | ||
|
||
- 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-s3-gw | ||
timeout-minutes: 5 | ||
run: | | ||
make all | ||
echo "$(pwd)/bin" >> $GITHUB_PATH | ||
working-directory: neofs-s3-gw | ||
|
||
- name: Copy binaries to testcases directory | ||
timeout-minutes: 30 | ||
run: | | ||
cp ${GITHUB_WORKSPACE}/neofs-s3-gw/bin/* . | ||
echo "$(pwd)" >> $GITHUB_PATH | ||
working-directory: neofs-testcases | ||
|
||
- name: Prepare venv | ||
timeout-minutes: 30 | ||
run: | | ||
make venv.no-dev-env-pytest | ||
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 current dir" | ||
ls -lah | ||
echo "==========================================" | ||
working-directory: neofs-testcases | ||
|
||
################################################################ | ||
- name: Run Sanity tests for pull requests | ||
timeout-minutes: 120 | ||
if: github.event_name == 'pull_request' | ||
run: | | ||
source venv.no-dev-env-pytest/bin/activate && pytest -s --alluredir=${GITHUB_WORKSPACE}/allure-results dynamic_env_pytest_tests/tests | ||
working-directory: neofs-testcases | ||
|
||
################################################################ | ||
- name: Generate Allure report | ||
timeout-minutes: 60 | ||
uses: simple-elf/[email protected] | ||
if: always() | ||
id: allure-report | ||
with: | ||
keep_reports: 100000 | ||
allure_results: allure-results | ||
allure_report: allure-report | ||
allure_history: allure-history | ||
|
||
- name: Archive allure report raw results | ||
uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: allure-report-raw-results | ||
path: allure-results |