diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a8eb071..2e0a8e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,9 +10,9 @@ jobs: strategy: matrix: variant: - - 7.4 - - 7.4-alpine - - 8.0 + - "7.4" + - "7.4-alpine" + - "8.0" platform: - linux/amd64 - linux/arm64 @@ -20,7 +20,7 @@ jobs: - variant: 7.4-alpine - platform: linux/arm64 env: - TEST_MATCH: PHP Version ${{ matrix.props.version }} + TEST_MATCH: PHP Version ${{ matrix.variant }} steps: - name: Checkout @@ -28,20 +28,14 @@ jobs: - name: Detect host configuration run: | - # NOTE: Docker host configuration determines the networking target for integration testing - v=$(mount | grep "/run/docker.sock") TARGET_HOST= - - if [[ -n "$v" ]]; then - echo "Injected docker socket detected" + if [[ -n "$ACT" ]]; then + echo "Local execution detected" TARGET_HOST="host.docker.internal" - elif [[ -S /var/run/docker.sock ]]; then - echo "Local docker socket detected" - TARGET_HOST="localhost" else - echo "No docker socket detected, falling back" TARGET_HOST="localhost" - fi + fi; + echo "TARGET_HOST=${TARGET_HOST}" >> $GITHUB_ENV - # Build and execute in multiple configurations: vanilla, with env overrides, with TLS enabled diff --git a/scripts/install-newrelic-alpine.sh b/scripts/install-newrelic-alpine.sh index 0cd223d..58fd4c1 100644 --- a/scripts/install-newrelic-alpine.sh +++ b/scripts/install-newrelic-alpine.sh @@ -46,8 +46,9 @@ mkdir -p /var/log/newrelic chmod 777 /var/log/newrelic cp agent/scripts/newrelic.ini.template "${CONF_PHPMODS}"/newrelic.ini +# Delete compilation directories, no longer needed +go clean --cache +rm -rf /root/newrelic-php-agent + # Cleanup script-specific packages apk del .newrelic_deps - -# Delete compilation directory, no longer needed -rm -rf /root/newrelic-php-agent diff --git a/scripts/install-newrelic-ubuntu.sh b/scripts/install-newrelic-ubuntu.sh index 8b6fa4d..5de2034 100644 --- a/scripts/install-newrelic-ubuntu.sh +++ b/scripts/install-newrelic-ubuntu.sh @@ -36,6 +36,7 @@ mkdir -p /var/log/newrelic chmod 777 /var/log/newrelic cp agent/scripts/newrelic.ini.template "${CONF_PHPMODS}"/newrelic.ini -# Delete compilation directory, no longer needed +# Delete compilation directories, no longer needed +go clean --cache rm -rf /root/newrelic-php-agent -rm -rf /root/.cache/go-build +