diff --git a/.github/workflows/prof_tests.yml b/.github/workflows/prof_tests.yml index fc5d81a2a5..4546a3a105 100644 --- a/.github/workflows/prof_tests.yml +++ b/.github/workflows/prof_tests.yml @@ -34,6 +34,7 @@ jobs: container: image: ${{ matrix.docker_image }} + options: --user root steps: - name: Checkout repository @@ -41,7 +42,8 @@ jobs: with: submodules: true - - name: Bake me into the image + - name: Bake me into the base image + if: contains(matrix.docker_image, 'alpine') run: | apk add --no-cache tar @@ -54,12 +56,10 @@ jobs: - name: Run cargo tests run: | - if [ -d '/opt/rh/devtoolset-7' ] ; then - set +eo pipefail - source scl_source enable devtoolset-7 - set -eo pipefail - fi set -eux + if [[ ${{ contains(matrix.docker_image, 'alpine') }} eq 1 ]]; then + source /root/.bashrc + fi switch-php "${PHP_VERSION}" cd profiling cargo test --release --all-features @@ -67,6 +67,10 @@ jobs: - name: Run phpt tests NTS run: | set -eux + echo ${{ contains(matrix.docker_image, 'alpine') }} + if [[ "${{ contains(matrix.docker_image, 'alpine') }}" == "1" ]]; then + source /root/.bashrc + fi switch-php "${PHP_VERSION}" libdir="/tmp/datadog-profiling" cd profiling @@ -80,6 +84,7 @@ jobs: - name: Run phpt tests ZTS run: | set -eux + source /root/.bashrc || true switch-php "${PHP_VERSION}-zts" libdir="/tmp/datadog-profiling" cd profiling