From 055f30fdce248c4d0a152b92cc67f9c12dba8f68 Mon Sep 17 00:00:00 2001 From: Elliot Morris Date: Tue, 19 Dec 2023 12:50:54 +0000 Subject: [PATCH 1/5] [CI] Add Ayon test integration Ayon e2e integration #1219 Adds ayon tests to our integrations.yml file. Pulls from the ayon repo and configures the environment using poetry, as instructed by ayon. Signed-off-by: Elliot Morris --- .github/workflows/integrations.yml | 68 ++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/.github/workflows/integrations.yml b/.github/workflows/integrations.yml index 9e6298241..55963aaf4 100644 --- a/.github/workflows/integrations.yml +++ b/.github/workflows/integrations.yml @@ -203,3 +203,71 @@ jobs: env: CMAKE_PREFIX_PATH: ${{ github.workspace }}/dist CMAKE_TOOLCHAIN_FILE: ${{ github.workspace }}/.conan/conan_paths.cmake + + ayon-integration: + name: Ayon resolver on ${{ matrix.config.os }} + runs-on: ${{ matrix.config.os }} + strategy: + fail-fast: false + matrix: + config: + - os: windows-2019 + site-packages: Lib/site-packages + - os: ubuntu-20.04 + site-packages: lib/python3.9/site-packages + - os: macos-11 + # MacOS toolchain doesn't search /usr/local by default: + # https://gitlab.kitware.com/cmake/cmake/-/issues/19120 + # The CMake FindPython module's Python::Python target (used in + # OpenAssetIO-Test-CMake) transitively adds linker flags to + # system libs, which fail due to this issue. + preamble: export LDFLAGS="-L/usr/local/lib" + site-packages: lib/python3.9/site-packages + defaults: + run: + shell: bash + + steps: + - uses: actions/checkout@v4 + + - name: Bootstrap + uses: ./.github/bootstrap_platform + + - name: Build OpenAssetIO (setup.py) + run: | + ${{ matrix.config.preamble }} + python -m pip install src/openassetio-python + env: + CMAKE_TOOLCHAIN_FILE: ${{ github.workspace }}/.conan/conan_paths.cmake + + - name: Checkout Ayon + uses: actions/checkout@v4 + with: + repository: ynput/ayon-openassetio-manager-plugin + token: ${{ secrets.GITHUB_TOKEN }} + path: ${{ github.workspace }}/ynput/ayon-openassetio-manager-plugin + + - name: Install and configure Poetry + run: | + cd ${{ github.workspace }}/ynput/ayon-openassetio-manager-plugin + mkdir -p ${{ github.workspace }}/ynput/ayon-openassetio-manager-plugin/.poetry + export POETRY_HOME="${{ github.workspace }}/ynput/ayon-openassetio-manager-plugin/.poetry" + curl -sSL https://install.python-poetry.org/ | python - + "${POETRY_HOME}/bin/poetry" config virtualenvs.in-project true --local + "${POETRY_HOME}/bin/poetry" config virtualenvs.create true --local + "${POETRY_HOME}/bin/poetry" install --no-root $poetry_verbosity --ansi + + - name: Run Ayon tests + run: | + cd ${{ github.workspace }}/ynput/ayon-openassetio-manager-plugin + .poetry/bin/poetry run pytest -v + env: + AYON_SERVER_URL: https://openassetio.ayon.dev + AYON_API_KEY: ${{ secrets.AYON_API_KEY }} + OPENASSETIO_PLUGIN_PATH: ${{ github.workspace }}/ynput/ayon-openassetio-manager-plugin/AyonOpenAssetIOManager + OPENASSETIO_DEFAULT_CONFIG: ${{ github.workspace }}/ynput/ayon-openassetio-manager-plugin/pyproject.toml + + + + + From 227d89b0f0ff78500935cc7e487a1b551c7751bf Mon Sep 17 00:00:00 2001 From: Elliot Morris Date: Tue, 19 Dec 2023 13:01:29 +0000 Subject: [PATCH 2/5] [Drop] Switch to personal fork for debug Signed-off-by: Elliot Morris --- .github/workflows/integrations.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integrations.yml b/.github/workflows/integrations.yml index 55963aaf4..999e1996b 100644 --- a/.github/workflows/integrations.yml +++ b/.github/workflows/integrations.yml @@ -243,7 +243,7 @@ jobs: - name: Checkout Ayon uses: actions/checkout@v4 with: - repository: ynput/ayon-openassetio-manager-plugin + repository: elliotcmorris/ayon-openassetio-manager-plugin token: ${{ secrets.GITHUB_TOKEN }} path: ${{ github.workspace }}/ynput/ayon-openassetio-manager-plugin From f79fba42733ed63b8238a7e1f7a315b44fd5b307 Mon Sep 17 00:00:00 2001 From: Elliot Morris Date: Thu, 4 Jan 2024 17:52:29 +0000 Subject: [PATCH 3/5] [CI] Attempt curl string. Signed-off-by: Elliot Morris --- .github/workflows/integrations.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/integrations.yml b/.github/workflows/integrations.yml index 999e1996b..8767ac7f6 100644 --- a/.github/workflows/integrations.yml +++ b/.github/workflows/integrations.yml @@ -259,6 +259,12 @@ jobs: - name: Run Ayon tests run: | + curl --header "x-ayon-site-id: oaio-tests" + --header "x-ayon-platform: linux" + --header "x-ayon-hostname: phobos" + --header "x-api-key: ${{ secrets.AYON_API_KEY }}" + --header "x-as-user: service" + --header "x-ayon-version: 1.0.0-rc.2+DEVELOP" http://localhost:5000/api/info cd ${{ github.workspace }}/ynput/ayon-openassetio-manager-plugin .poetry/bin/poetry run pytest -v env: From dcea6640204ea4267977a0ef7f6fdaec12dc6fdf Mon Sep 17 00:00:00 2001 From: Elliot Morris Date: Thu, 4 Jan 2024 17:56:46 +0000 Subject: [PATCH 4/5] fixup! [CI] Attempt curl string. --- .github/workflows/integrations.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integrations.yml b/.github/workflows/integrations.yml index 8767ac7f6..9c7110de8 100644 --- a/.github/workflows/integrations.yml +++ b/.github/workflows/integrations.yml @@ -257,14 +257,17 @@ jobs: "${POETRY_HOME}/bin/poetry" config virtualenvs.create true --local "${POETRY_HOME}/bin/poetry" install --no-root $poetry_verbosity --ansi - - name: Run Ayon tests - run: | + - name: Configure Ayon Site + run: > curl --header "x-ayon-site-id: oaio-tests" --header "x-ayon-platform: linux" --header "x-ayon-hostname: phobos" --header "x-api-key: ${{ secrets.AYON_API_KEY }}" --header "x-as-user: service" --header "x-ayon-version: 1.0.0-rc.2+DEVELOP" http://localhost:5000/api/info + + - name: Run Ayon tests + run: | cd ${{ github.workspace }}/ynput/ayon-openassetio-manager-plugin .poetry/bin/poetry run pytest -v env: From 25fa6b914993452a0ae6b0e9817beee5436ab66a Mon Sep 17 00:00:00 2001 From: Elliot Morris Date: Thu, 4 Jan 2024 18:01:34 +0000 Subject: [PATCH 5/5] fixup! [CI] Attempt curl string. a birdie told me actions dosen't like localhost --- .github/workflows/integrations.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integrations.yml b/.github/workflows/integrations.yml index 9c7110de8..855329843 100644 --- a/.github/workflows/integrations.yml +++ b/.github/workflows/integrations.yml @@ -264,7 +264,7 @@ jobs: --header "x-ayon-hostname: phobos" --header "x-api-key: ${{ secrets.AYON_API_KEY }}" --header "x-as-user: service" - --header "x-ayon-version: 1.0.0-rc.2+DEVELOP" http://localhost:5000/api/info + --header "x-ayon-version: 1.0.0-rc.2+DEVELOP" http://127.0.0.1:5000/api/info - name: Run Ayon tests run: |