diff --git a/.github/shared/actions/devcontainer-shell-run/action.yaml b/.github/shared/actions/devcontainer-shell-run/action.yaml index cdaed1a..b078cb6 100644 --- a/.github/shared/actions/devcontainer-shell-run/action.yaml +++ b/.github/shared/actions/devcontainer-shell-run/action.yaml @@ -19,6 +19,10 @@ runs: - uses: devcontainers/ci@v0.3 id: devcontainer_shell_run + env: + # for some reason these default env vars are not available in the dev container by default + GITHUB_ACTIONS: true + CI: true with: push: never cacheFrom: ${{ steps.image_name.outputs.image_name }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1d6862d..2b52140 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -45,9 +45,6 @@ jobs: id: build_project with: runCmd: | - # for some reason these default env vars are not available in the dev container by default - export GITHUB_ACTIONS=true - export CI=true env pnpm install --frozen-lockfile echo "WP_ENV_HOME=${WP_ENV_HOME}" diff --git a/scripts/build.sh b/scripts/build.sh index 2a2fbc4..3253548 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -6,15 +6,15 @@ # this script is used to build all packages of the monorepo # +# bootstrap the environment +source "$(realpath $0 | xargs dirname)/includes/bootstrap.sh" + # skip building if BUILD_UP_TO_DATE is set to 1 if [[ "${BUILD_UP_TO_DATE:-}" == '1' ]]; then ionos.wordpress.log_info "skip (re)building : BUILD_UP_TO_DATE=1" exit 0 fi -# bootstrap the environment -source "$(realpath $0 | xargs dirname)/includes/bootstrap.sh" - # build a monorepo workspace package of type npm # # @param $1 path to workspace package directory diff --git a/scripts/test.sh b/scripts/test.sh index de49839..546fd91 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -11,7 +11,7 @@ source "$(realpath $0 | xargs dirname)/includes/bootstrap.sh" #region execute storybook tests # install playwright dependencies -([[ "$CI" == "1" ]] || [[ "$CI" == "true" ]]) && pnpm exec playwright install-deps +[[ -z $CI ]] && pnpm exec playwright install-deps pnpm exec playwright test -c ./playwright-ct.config.js $@ #endregion