-
Notifications
You must be signed in to change notification settings - Fork 5
42 lines (42 loc) · 1.39 KB
/
sage-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Sage Install Tests
on:
push:
pull_request:
branches:
- main
paths:
- '/private/scripts/**'
jobs:
linux:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
php-version: [7.4, 8.0, 8.1, 8.2]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- name: Get latest Terminus release
run: |
latest_version=$(curl --silent "https://api.github.com/repos/pantheon-systems/terminus/releases/latest" | jq -r .tag_name)
echo "Terminus Latest version is $latest_version"
curl -L "https://github.com/pantheon-systems/terminus/releases/download/$latest_version/terminus.phar" -o terminus
chmod +x terminus
sudo mv terminus /usr/local/bin/
- name: Install Composer Dependencies
run: composer install --no-progress --no-suggest --prefer-dist
- name: Run Sage Install Script
run: |
composer install-sage || exit_code=$?
if [[ -n "${exit_code}" ]]; then
echo "❌ Sage Install Script Failed with exit code ${exit_code}"
exit $exit_code
else
echo "✅ Sage Install Script passed!"
exit 0;
fi
shell: bash