Allow to configure multiple rpc endpoints #282
Workflow file for this run
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
name: S3 tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
- support/** | |
types: [opened, synchronize] | |
paths-ignore: | |
- '**/*.md' | |
release: | |
types: | |
- published | |
workflow_dispatch: | |
inputs: | |
neofs-s3-gw_ref: | |
description: 'neofs-s3-gw ref. Default ref - latest master. Examples: v0.27.0, 8fdcc6d7e798e6511be8806b81894622e72d7fdc, branch_name' | |
required: false | |
default: '' | |
permissions: write-all | |
env: | |
S3_TESTS_CONFIG: s3tests.conf | |
ALLURE_RESULTS_DIR: ${{ github.workspace }}/allure-results | |
jobs: | |
s3-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get the current date | |
id: date | |
shell: bash | |
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 s3-tests repository | |
uses: actions/checkout@v4 | |
with: | |
repository: nspcc-dev/s3-tests | |
ref: 'master' | |
path: s3-tests | |
- name: Download latest stable neofs-cli | |
uses: dsaltares/[email protected] | |
with: | |
repo: 'nspcc-dev/neofs-node' | |
version: 'tags/v0.42.0' | |
file: 'neofs-cli-linux-amd64' | |
target: 's3-tests/neofs-cli' | |
- name: Download latest stable neofs-adm | |
uses: dsaltares/[email protected] | |
with: | |
repo: 'nspcc-dev/neofs-node' | |
version: 'tags/v0.42.0' | |
file: 'neofs-adm-linux-amd64' | |
target: 's3-tests/neofs-adm' | |
- name: Download latest stable neofs-ir | |
uses: dsaltares/[email protected] | |
with: | |
repo: 'nspcc-dev/neofs-node' | |
version: 'tags/v0.42.0' | |
file: 'neofs-ir-linux-amd64' | |
target: 's3-tests/neofs-ir' | |
- name: Download latest stable neofs-lens | |
uses: dsaltares/[email protected] | |
with: | |
repo: 'nspcc-dev/neofs-node' | |
version: 'tags/v0.42.0' | |
file: 'neofs-lens-linux-amd64' | |
target: 's3-tests/neofs-lens' | |
- name: Download latest stable neofs-node | |
uses: dsaltares/[email protected] | |
with: | |
repo: 'nspcc-dev/neofs-node' | |
version: 'tags/v0.42.0' | |
file: 'neofs-node-linux-amd64' | |
target: 's3-tests/neofs-node' | |
- name: Download latest stable neo-go | |
uses: dsaltares/[email protected] | |
with: | |
repo: 'nspcc-dev/neo-go' | |
version: 'tags/v0.106.0' | |
file: 'neo-go-linux-amd64' | |
target: 's3-tests/neo-go' | |
################################################################ | |
- 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 | |
- name: Checkout neofs-s3-gw repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.inputs.neofs-s3-gw_ref }} | |
path: neofs-s3-gw | |
- name: Build neofs-s3-gw | |
timeout-minutes: 5 | |
run: | | |
make all | |
echo "$(pwd)/bin" >> $GITHUB_PATH | |
working-directory: neofs-s3-gw | |
- name: Copy built binaries | |
timeout-minutes: 30 | |
run: | | |
cp ../neofs-s3-gw/bin/neofs-s3-gw . | |
cp ../neofs-s3-gw/bin/neofs-s3-authmate . | |
working-directory: s3-tests | |
- 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 neo-go | |
sudo chmod a+x neofs-s3-authmate | |
sudo chmod a+x neofs-s3-gw | |
echo "$(pwd)" >> $GITHUB_PATH | |
working-directory: s3-tests | |
- 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 "==========================================" | |
working-directory: s3-tests | |
- name: Setup test env | |
id: prepare_test_env | |
run: | | |
git submodule init | |
git submodule update | |
python3.12 -m venv virtualenv | |
source virtualenv/bin/activate | |
pip3 install --upgrade pip | |
pip3 install -r requirements.txt | |
echo "export PYTHONPATH=$PYTHONPATH:$(realpath .):$(realpath .)/neofs-testcases/pytest_tests/lib:$(realpath .)/neofs-testcases/neofs-testlib" >> virtualenv/bin/activate | |
working-directory: s3-tests | |
- name: Fix OpenSSL ripemd160 | |
run: | | |
sudo python ./neofs-testcases/tools/src/openssl_config_fix.py | |
working-directory: s3-tests | |
- name: s3 tests | |
env: | |
NEOFS_MORPH_DISABLE_CACHE: 'true' | |
WALLET_PASS: 'password' | |
run: | | |
source virtualenv/bin/activate | |
S3TEST_CONF=${S3_TESTS_CONFIG} pytest -m 'not fails_on_aws and not fails_on_dbstore' --alluredir=${{ env.ALLURE_RESULTS_DIR }} -v -s s3tests_boto3/functional/test_s3.py s3tests_boto3/functional/test_s3_neofs.py | |
working-directory: s3-tests | |
################################################################ | |
- name: Publish to NeoFS | |
id: put_report | |
if: always() && steps.prepare_test_env.outcome == 'success' | |
uses: nspcc-dev/gh-push-allure-report-to-neofs@master | |
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 link to s3 tests 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: 'S3 tests report' | |
state: 'success' | |
sha: ${{github.event.pull_request.head.sha || github.sha}} | |
target_url: ${{ env.REPORT_NEOFS_URL }} |