diff --git a/.github/workflows/registry-ci.yml b/.github/workflows/registry-ci.yml index f663b0a3a..1f90f623d 100644 --- a/.github/workflows/registry-ci.yml +++ b/.github/workflows/registry-ci.yml @@ -13,14 +13,11 @@ jobs: strategy: fail-fast: false matrix: - php: ["8.3", "8.4", "8.5"] + php: ["8.3"] db_engine: ["postgres", "mysql", "mariadb"] env: COMANAGE_REGISTRY_DIR: /srv/comanage-registry - COMANAGE_REGISTRY_URL_PATH: registry - COMANAGE_REGISTRY_VERSION: develop - # COMANAGE_REGISTRY_SRC_URL is computed dynamically in a step. # Values used by your PHPUnit setup test COMANAGE_REGISTRY_ADMIN_GIVEN_NAME: Admin @@ -43,7 +40,7 @@ jobs: --depth=1 \ --branch "${GITHUB_REF_NAME}" \ "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" \ - "${GITHUB_WORKSPACE}" + "${COMANAGE_REGISTRY_DIR}" - name: Install PHP ${{ matrix.php }} and extensions shell: bash @@ -69,21 +66,8 @@ jobs: php${PHP_VER}-xsl \ php${PHP_VER}-memcached \ php${PHP_VER}-curl - sudo update-alternatives --set php /usr/bin/php${PHP_VER} - - - name: Compute COMANAGE_REGISTRY_SRC_URL - shell: bash - run: | - set -euo pipefail - echo "COMANAGE_REGISTRY_SRC_URL=https://github.internet2.edu/COmanage/registry/archive/${COMANAGE_REGISTRY_VERSION}.tar.gz" >> "$GITHUB_ENV" - - - name: Show versions - shell: bash - run: | - set -euxo pipefail - php -v - composer --version - docker --version + sudo ln -sf /usr/bin/php${PHP_VER} /usr/local/bin/php + echo "PHP_VER=${PHP_VER}" >> "$GITHUB_ENV" - name: Install OS packages needed for setup shell: bash @@ -102,44 +86,21 @@ jobs: libjpeg-dev \ libfreetype6-dev \ libxslt1.1 \ - libmemcached11 + libmemcached11 \ + tree - - name: Download and unpack COmanage Registry (${COMANAGE_REGISTRY_VERSION}) + - name: Show versions shell: bash - env: - GHE_TOKEN: ${{ secrets.GHE_TOKEN }} run: | set -euxo pipefail + php -v + composer --version + docker --version - sudo mkdir -p "${COMANAGE_REGISTRY_DIR}" - sudo rm -rf "${COMANAGE_REGISTRY_DIR:?}/"* - - # If your GitHub Enterprise requires auth, use token. If not needed, wget/curl will still work. - if [ -n "${GHE_TOKEN:-}" ]; then - curl -fL \ - -H "Authorization: token ${GHE_TOKEN}" \ - -o /tmp/comanage.tar.gz \ - "${COMANAGE_REGISTRY_SRC_URL}" - else - wget -O /tmp/comanage.tar.gz "${COMANAGE_REGISTRY_SRC_URL}" - fi - - sudo tar -zxf /tmp/comanage.tar.gz -C "${COMANAGE_REGISTRY_DIR}" --strip-components=1 - rm -f /tmp/comanage.tar.gz - - - name: Create local tmp/cache + webroot symlink + - name: Show working directory shell: bash run: | - set -euxo pipefail - sudo ln -s /var/cache/registry/tmp "${COMANAGE_REGISTRY_DIR}/local/tmp" - sudo chown -h www-data:www-data "${COMANAGE_REGISTRY_DIR}/local/tmp" - - sudo mkdir -p /var/www/html - sudo rm -f "/var/www/html/${COMANAGE_REGISTRY_URL_PATH}" - sudo ln -s "${COMANAGE_REGISTRY_DIR}/app/webroot" "/var/www/html/${COMANAGE_REGISTRY_URL_PATH}" - - echo "Registry URL path is: ${COMANAGE_REGISTRY_URL_PATH}" - echo "Registry Version is: ${COMANAGE_REGISTRY_VERSION}" + tree -L 2 "${COMANAGE_REGISTRY_DIR}" - name: Create local/config/database.php placeholder shell: bash