From 08b19c040070eaaa45d7b277200532dfa88e824b Mon Sep 17 00:00:00 2001 From: Konstantin Babushkin Date: Wed, 20 Dec 2023 21:53:01 +0100 Subject: [PATCH] one integration workflow to rule them all --- .../workflows/integration_block_storage.yml | 77 ------------------- .github/workflows/integration_compute.yml | 76 ------------------ .github/workflows/integration_identity.yml | 73 ------------------ .github/workflows/integration_images.yml | 75 ------------------ .github/workflows/integration_networking.yml | 75 ------------------ ...ject_storage.yml => integration_tests.yml} | 39 +++++++--- 6 files changed, 30 insertions(+), 385 deletions(-) delete mode 100644 .github/workflows/integration_block_storage.yml delete mode 100644 .github/workflows/integration_compute.yml delete mode 100644 .github/workflows/integration_identity.yml delete mode 100644 .github/workflows/integration_images.yml delete mode 100644 .github/workflows/integration_networking.yml rename .github/workflows/{integration_object_storage.yml => integration_tests.yml} (67%) diff --git a/.github/workflows/integration_block_storage.yml b/.github/workflows/integration_block_storage.yml deleted file mode 100644 index 93dae725..00000000 --- a/.github/workflows/integration_block_storage.yml +++ /dev/null @@ -1,77 +0,0 @@ -name: Block Storage Integration Tests - -on: - workflow_dispatch: - pull_request: - paths: - - '**BlockStorage**' - - '**Common**' - push: - branches: - - master - -jobs: - tests: - if: "!contains(github.event.head_commit.message, 'skip ci') && !contains(github.event.head_commit.message, 'ci skip')" - strategy: - fail-fast: false - matrix: - openstack_version: [ "stable/wallaby" ] # v2 is removed from xena - php_version: [ 8.1 ] - ubuntu_version: [ 20.04 ] - runs-on: ubuntu-${{ matrix.ubuntu_version }} - name: Deploy OpenStack ${{ matrix.name }} and run Block Storage integration tests with php ${{matrix.php_version}} - steps: - - uses: actions/checkout@v2 - - name: get cache directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - uses: actions/cache@v3 - with: - path: | - ~/.php_cs.cache - ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ matrix.php_version }}-${{ hashFiles('**.composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer-${{ matrix.php_version }}- - - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php_version }} - extensions: curl - tools: composer:v2 - coverage: none - - run: composer install --prefer-dist --no-interaction --no-progress - - name: Restore devstack cache - uses: actions/cache@v3 - with: - path: | - /opt/stack/* - !/opt/stack/data - ~/devstack/ - key: ${{ runner.os }}-openstack-${{ matrix.openstack_version }}-${{ github.workflow }} - - name: Deploy devstack - uses: EmilienM/devstack-action@v0.11 - with: - branch: ${{ matrix.openstack_version }} - conf_overrides: | - CINDER_ISCSI_HELPER=lioadm - enabled_services: 's-account,s-container,s-object,s-proxy,s-bak' - - name: Set env variables - run: | - { - echo OS_AUTH_URL="$(grep -oP -m 1 "(?<=auth_url: )(.*)\$" /etc/openstack/clouds.yaml)/v3" - echo OS_REGION=RegionOne - echo OS_REGION_NAME=RegionOne - echo OS_USER_ID=$(openstack --os-cloud=devstack-admin user show admin -f value -c id) - echo OS_USERNAME=admin - echo OS_PASSWORD=secret - echo OS_PROJECT_ID=$(openstack --os-cloud=devstack-admin project show admin -f value -c id) - echo OS_PROJECT_NAME=admin - echo OS_RESIZE_FLAVOR=c1 - echo OS_FLAVOR=1 - echo OS_DOMAIN_ID=default - } >> "$GITHUB_ENV" - - name: Execute integration tests - run: php ./tests/integration/run.php -s=BlockStorage - diff --git a/.github/workflows/integration_compute.yml b/.github/workflows/integration_compute.yml deleted file mode 100644 index e8c41bed..00000000 --- a/.github/workflows/integration_compute.yml +++ /dev/null @@ -1,76 +0,0 @@ -name: Compute Integration Tests -on: - workflow_dispatch: - pull_request: - paths: - - '**Compute**' - - '**Common**' - push: - branches: - - master - -jobs: - tests: - if: "!contains(github.event.head_commit.message, 'skip ci') && !contains(github.event.head_commit.message, 'ci skip')" - strategy: - fail-fast: false - matrix: - openstack_version: [ "stable/wallaby" ] # Cinder v2 is removed from xena - php_version: [ 8.1 ] - ubuntu_version: [ 20.04 ] - runs-on: ubuntu-${{ matrix.ubuntu_version }} - name: Deploy OpenStack ${{ matrix.name }} with Nova and run Compute integration tests with php ${{matrix.php_version}} - steps: - - uses: actions/checkout@v2 - - name: get cache directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - uses: actions/cache@v3 - with: - path: | - ~/.php_cs.cache - ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ matrix.php_version }}-${{ hashFiles('**.composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer-${{ matrix.php_version }}- - - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php_version }} - extensions: curl - tools: composer:v2 - coverage: none - - run: composer install --prefer-dist --no-interaction --no-progress - - name: Restore devstack cache - uses: actions/cache@v3 - with: - path: | - /opt/stack/* - !/opt/stack/data - ~/devstack/ - key: ${{ runner.os }}-openstack-${{ matrix.openstack_version }}-${{ github.workflow }} - - name: Deploy devstack - uses: EmilienM/devstack-action@v0.11 - with: - branch: ${{ matrix.openstack_version }} - conf_overrides: | - CINDER_ISCSI_HELPER=lioadm - enabled_services: 's-account,s-container,s-object,s-proxy,s-bak' - - name: Set env variables - run: | - { - echo OS_AUTH_URL="$(grep -oP -m 1 "(?<=auth_url: )(.*)\$" /etc/openstack/clouds.yaml)/v3" - echo OS_REGION=RegionOne - echo OS_REGION_NAME=RegionOne - echo OS_USER_ID=$(openstack --os-cloud=devstack-admin user show admin -f value -c id) - echo OS_USERNAME=admin - echo OS_PASSWORD=secret - echo OS_PROJECT_ID=$(openstack --os-cloud=devstack-admin project show admin -f value -c id) - echo OS_PROJECT_NAME=admin - echo OS_RESIZE_FLAVOR=c1 - echo OS_FLAVOR=1 - echo OS_DOMAIN_ID=default - } >> "$GITHUB_ENV" - - name: Execute integration tests - run: php ./tests/integration/run.php -s=Compute - diff --git a/.github/workflows/integration_identity.yml b/.github/workflows/integration_identity.yml deleted file mode 100644 index d35c5438..00000000 --- a/.github/workflows/integration_identity.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: Identity Integration Tests -on: - workflow_dispatch: - pull_request: - paths: - - '**Identity**' - - '**Common**' - push: - branches: - - master - -jobs: - tests: - if: "!contains(github.event.head_commit.message, 'skip ci') && !contains(github.event.head_commit.message, 'ci skip')" - strategy: - fail-fast: false - matrix: - openstack_version: [ "stable/zed" ] - php_version: [ 8.1 ] - ubuntu_version: [ 20.04 ] - runs-on: ubuntu-${{ matrix.ubuntu_version }} - name: Deploy OpenStack ${{ matrix.name }} and run Identity integration tests with php ${{matrix.php_version}} - steps: - - uses: actions/checkout@v2 - - name: get cache directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - uses: actions/cache@v3 - with: - path: | - ~/.php_cs.cache - ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-cache-${{ matrix.php_version }}-${{ hashFiles('**.composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer-${{ matrix.php_version }}- - - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php_version }} - extensions: curl - tools: composer:v2 - coverage: none - - run: composer install --prefer-dist --no-interaction --no-progress - - name: Restore devstack cache - uses: actions/cache@v3 - with: - path: | - /opt/stack/* - !/opt/stack/data - ~/devstack/ - key: ${{ runner.os }}-openstack-${{ matrix.openstack_version }}-${{ github.workflow }} - - name: Deploy devstack - uses: EmilienM/devstack-action@v0.11 - with: - branch: ${{ matrix.openstack_version }} - - name: Set env variables - run: | - { - echo OS_AUTH_URL="$(grep -oP -m 1 "(?<=auth_url: )(.*)\$" /etc/openstack/clouds.yaml)/v3" - echo OS_REGION=RegionOne - echo OS_REGION_NAME=RegionOne - echo OS_USER_ID=$(openstack --os-cloud=devstack-admin user show admin -f value -c id) - echo OS_USERNAME=admin - echo OS_PASSWORD=secret - echo OS_PROJECT_ID=$(openstack --os-cloud=devstack-admin project show admin -f value -c id) - echo OS_PROJECT_NAME=admin - echo OS_RESIZE_FLAVOR=c1 - echo OS_FLAVOR=1 - echo OS_DOMAIN_ID=default - } >> "$GITHUB_ENV" - - name: Execute integration tests - run: php ./tests/integration/run.php -s=Identity - diff --git a/.github/workflows/integration_images.yml b/.github/workflows/integration_images.yml deleted file mode 100644 index 21d07102..00000000 --- a/.github/workflows/integration_images.yml +++ /dev/null @@ -1,75 +0,0 @@ -name: Images Integration Tests -on: - workflow_dispatch: - pull_request: - paths: - - '**Images**' - - '**Common**' - push: - branches: - - master - -jobs: - tests: - if: "!contains(github.event.head_commit.message, 'skip ci') && !contains(github.event.head_commit.message, 'ci skip')" - strategy: - fail-fast: false - matrix: - openstack_version: [ "stable/zed" ] - php_version: [ 8.1 ] - ubuntu_version: [ 20.04 ] - runs-on: ubuntu-${{ matrix.ubuntu_version }} - name: Deploy OpenStack ${{ matrix.name }} with Glance and run Images integration tests with php ${{matrix.php_version}} - steps: - - uses: actions/checkout@v2 - - name: get cache directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - uses: actions/cache@v3 - with: - path: | - ~/.php_cs.cache - ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ matrix.php_version }}-${{ hashFiles('**.composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer-${{ matrix.php_version }}- - - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php_version }} - extensions: curl - tools: composer:v2 - coverage: none - - run: composer install --prefer-dist --no-interaction --no-progress - - name: Restore devstack cache - uses: actions/cache@v3 - with: - path: | - /opt/stack/* - !/opt/stack/data - ~/devstack/ - key: ${{ runner.os }}-openstack-${{ matrix.openstack_version }}-${{ github.workflow }} - - name: Deploy devstack - uses: EmilienM/devstack-action@v0.11 - with: - branch: ${{ matrix.openstack_version }} - conf_overrides: | - CINDER_ISCSI_HELPER=lioadm - - name: Set env variables - run: | - { - echo OS_AUTH_URL="$(grep -oP -m 1 "(?<=auth_url: )(.*)\$" /etc/openstack/clouds.yaml)/v3" - echo OS_REGION=RegionOne - echo OS_REGION_NAME=RegionOne - echo OS_USER_ID=$(openstack --os-cloud=devstack-admin user show admin -f value -c id) - echo OS_USERNAME=admin - echo OS_PASSWORD=secret - echo OS_PROJECT_ID=$(openstack --os-cloud=devstack-admin project show admin -f value -c id) - echo OS_PROJECT_NAME=admin - echo OS_RESIZE_FLAVOR=c1 - echo OS_FLAVOR=1 - echo OS_DOMAIN_ID=default - } >> "$GITHUB_ENV" - - name: Execute integration tests - run: php ./tests/integration/run.php -s=Images - diff --git a/.github/workflows/integration_networking.yml b/.github/workflows/integration_networking.yml deleted file mode 100644 index db3678a0..00000000 --- a/.github/workflows/integration_networking.yml +++ /dev/null @@ -1,75 +0,0 @@ -name: Networking Integration Tests -on: - workflow_dispatch: - pull_request: - paths: - - '**Networking**' - - '**Common**' - push: - branches: - - master - -jobs: - tests: - if: "!contains(github.event.head_commit.message, 'skip ci') && !contains(github.event.head_commit.message, 'ci skip')" - strategy: - fail-fast: false - matrix: - openstack_version: [ "stable/zed" ] - php_version: [ 8.1 ] - ubuntu_version: [ 20.04 ] - runs-on: ubuntu-${{ matrix.ubuntu_version }} - name: Deploy OpenStack ${{ matrix.name }} with Neutron and run Networking integration tests with php ${{matrix.php_version}} - steps: - - uses: actions/checkout@v2 - - name: get cache directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - uses: actions/cache@v3 - with: - path: | - ~/.php_cs.cache - ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ matrix.php_version }}-${{ hashFiles('**.composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer-${{ matrix.php_version }}- - - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php_version }} - extensions: curl - tools: composer:v2 - coverage: none - - run: composer install --prefer-dist --no-interaction --no-progress - - name: Restore devstack cache - uses: actions/cache@v3 - with: - path: | - /opt/stack/* - !/opt/stack/data - ~/devstack/ - key: ${{ runner.os }}-openstack-${{ matrix.openstack_version }}-${{ github.workflow }} - - name: Deploy devstack - uses: EmilienM/devstack-action@v0.11 - with: - branch: ${{ matrix.openstack_version }} - conf_overrides: | - CINDER_ISCSI_HELPER=lioadm - - name: Set env variables - run: | - { - echo OS_AUTH_URL="$(grep -oP -m 1 "(?<=auth_url: )(.*)\$" /etc/openstack/clouds.yaml)/v3" - echo OS_REGION=RegionOne - echo OS_REGION_NAME=RegionOne - echo OS_USER_ID=$(openstack --os-cloud=devstack-admin user show admin -f value -c id) - echo OS_USERNAME=admin - echo OS_PASSWORD=secret - echo OS_PROJECT_ID=$(openstack --os-cloud=devstack-admin project show admin -f value -c id) - echo OS_PROJECT_NAME=admin - echo OS_RESIZE_FLAVOR=c1 - echo OS_FLAVOR=1 - echo OS_DOMAIN_ID=default - } >> "$GITHUB_ENV" - - name: Execute integration tests - run: php ./tests/integration/run.php -s=Networking - diff --git a/.github/workflows/integration_object_storage.yml b/.github/workflows/integration_tests.yml similarity index 67% rename from .github/workflows/integration_object_storage.yml rename to .github/workflows/integration_tests.yml index 5e0e7cc3..f6816aed 100644 --- a/.github/workflows/integration_object_storage.yml +++ b/.github/workflows/integration_tests.yml @@ -1,10 +1,8 @@ -name: Object Storage Integration Tests +name: Block Storage Integration Tests + on: workflow_dispatch: pull_request: - paths: - - '**ObjectStore**' - - '**Common**' push: branches: - master @@ -15,11 +13,21 @@ jobs: strategy: fail-fast: false matrix: - openstack_version: [ "stable/zed" ] + openstack_version: [ "stable/wallaby", "stable/zed", "stable/2023.2" ] php_version: [ 8.1 ] - ubuntu_version: [ 20.04 ] + include: + - name: "bobcat" + openstack_version: "stable/2023.2" + ubuntu_version: "22.04" + - name: "zed" + openstack_version: "stable/zed" + ubuntu_version: "20.04" + - name: "wallaby" + openstack_version: "stable/wallaby" + ubuntu_version: "20.04" + block_storage_v2: true runs-on: ubuntu-${{ matrix.ubuntu_version }} - name: Deploy OpenStack ${{ matrix.name }} and run ObjectStore integration tests with php ${{matrix.php_version}} + name: Deploy OpenStack ${{ matrix.name }} and run integration tests with php ${{matrix.php_version}} steps: - uses: actions/checkout@v2 - name: get cache directory @@ -54,12 +62,13 @@ jobs: with: branch: ${{ matrix.openstack_version }} conf_overrides: | + CINDER_ISCSI_HELPER=lioadm SWIFT_ENABLE_TEMPURLS=True SWIFT_TEMPURL_KEY=secretkey [[post-config|\$SWIFT_CONFIG_PROXY_SERVER]] [filter:versioned_writes] allow_object_versioning = true - enabled_services: 's-account,s-container,s-object,s-proxy' + enabled_services: 's-account,s-container,s-object,s-proxy,s-bak' - name: Set env variables run: | { @@ -75,6 +84,18 @@ jobs: echo OS_FLAVOR=1 echo OS_DOMAIN_ID=default } >> "$GITHUB_ENV" - - name: Execute integration tests + - name: Execute Block Storage tests + if: matrix.block_storage_v2 == true + run: php ./tests/integration/run.php -s=BlockStorage + - name: Execute Compute tests + if: matrix.block_storage_v2 == true + run: php ./tests/integration/run.php -s=Compute + - name: Execute Identity tests + run: php ./tests/integration/run.php -s=Identity + - name: Execute Images tests + run: php ./tests/integration/run.php -s=Images + - name: Execute Networking tests + run: php ./tests/integration/run.php -s=Networking + - name: Execute Object Storage tests run: php ./tests/integration/run.php -s=ObjectStore