Skip to content

Commit 3b506dd

Browse files
committed
Fix shell environment and improve asdf setup in CI
1 parent c17091d commit 3b506dd

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

.github/workflows/workflow.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,26 +59,30 @@ jobs:
5959

6060
- name: Test PHP installation
6161
timeout-minutes: 30
62+
shell: bash
6263
run: |
64+
set -euo pipefail
65+
6366
# Initialize submodule
6467
git submodule update --init --recursive
6568
6669
# Set executable permissions
67-
chmod +x bin/*
70+
chmod +x bin/* lib/*
6871
6972
# Install asdf
70-
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0
73+
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.18.0
7174
72-
# Setup environment
73-
export PATH="$HOME/.asdf/bin:$PATH"
74-
. $HOME/.asdf/asdf.sh
75+
# Setup asdf in current shell
76+
export PATH="$HOME/.asdf/bin:$HOME/.asdf/shims:$PATH"
77+
source $HOME/.asdf/asdf.sh
7578
7679
# Add plugin
80+
echo "Adding PHP plugin..."
7781
asdf plugin add php $GITHUB_WORKSPACE
7882
7983
# Install PHP
8084
echo "Installing PHP ${{ matrix.os.version }}..."
81-
VERBOSE=y asdf install php ${{ matrix.os.version }}
85+
asdf install php ${{ matrix.os.version }}
8286
8387
# Set global version and test
8488
echo "Setting global PHP version..."

0 commit comments

Comments
 (0)