Skip to content

Commit 3ec9c5d

Browse files
committed
Merge branch '4.x' of github.com:pantheon-systems/terminus into lops-1688
2 parents 31f3efa + 2896200 commit 3ec9c5d

File tree

199 files changed

+9974
-2270
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

199 files changed

+9974
-2270
lines changed

.env.dist

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,45 @@
11
export PROJECT_PATH=$(realpath .)
2-
export TERMINUS_SITE="terminus-test-site"
2+
## Note: The terminus test site must have some quicksilver scripts enabled
3+
## in order for tests to pass.
4+
## Needed for unit test fixutures
5+
export TERMINUS_PROJECT_ROOT=${PROJECT_PATH}
6+
7+
## This is the site that will be used for testing
8+
export TERMINUS_SITE="ci-terminus-composer"
9+
10+
## This is the site that will be used for testing wordpress commands
311
export TERMINUS_SITE_WP="terminus-test-site-wordpress"
12+
13+
## This is the site that will be used for testing wordpress network
414
export TERMINUS_SITE_WP_NETWORK="terminus-test-site-wp-network"
15+
16+
## This is the site that will be used for cloning a test environment on which to run tests
517
export TERMINUS_ENV="dev"
18+
19+
## this is the org that will be used. The site(s) above need to be in this org
620
export TERMINUS_ORG="Agency"
21+
22+
## This is the user that will be used for testing Should be attached the token below
723
export TERMINUS_USER="[email protected]"
24+
825
## To Autoload your token from your local machine, change the TERMINUS_TOKEN to the following command:
926
## export TERMINUS_TOKEN=$(cat $HOME/.terminus/cache/tokens/[email protected] | jq -r .token)
1027
export TERMINUS_TOKEN="{TERMINUS TOKEN}"
28+
29+
## this is the folder that terminus will use to store its data during the tests
1130
export TERMINUS_BASE_DIR="/tmp/terminus-data"
31+
32+
## this is the folder that terminus will use to store its plugins during the tests
1233
export TERMINUS_PLUGINS2_DIR="${TERMINUS_BASE_DIR}/plugins"
34+
35+
## this is the folder that terminus will use to store its plugins during the tests
1336
export TERMINUS_PLUGINS_DIR="${TERMINUS_BASE_DIR}/plugins-3.x"
37+
38+
## Used for testing plugins
1439
export TERMINUS_DEPENDENCIES_BASE_DIR="${TERMINUS_BASE_DIR}/dependencies-1"
40+
41+
## this will prevent the tests from creating a test environment for the run
1542
export TERMINUS_TESTING_RUNTIME_ENV=
43+
44+
## this will prevent tests from reinstalling the development packages once a phar is built
1645
export TERMINUS_ON_PHAR_COMPLETE_REINSTALL_COMPOSER_WITH_DEV=1

.github/workflows/3x.yml

Lines changed: 34 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
name: Terminus 3.x
1+
name: Terminus 4.x
22
on:
33
push:
4-
schedule:
5-
- cron: '0 6 * * *'
64
workflow_dispatch:
75
inputs:
86
functional_tests_group:
@@ -14,23 +12,28 @@ on:
1412
required: true
1513
default: "0"
1614

15+
# Cancel previous runs of this same branch/PR/etc.
16+
concurrency:
17+
group: 'ci-${{ github.head_ref || github.ref }}'
18+
cancel-in-progress: true
19+
1720
jobs:
1821
# Checkout in separate job because docker image is alpine based and checkout action doesn't work.
1922
checkout_build:
2023
runs-on: ubuntu-latest
2124
container:
22-
image: quay.io/pantheon-public/php-ci:v7.4
25+
image: quay.io/pantheon-public/php-ci:v8.2
2326
name: Checkout & build Phar
2427
steps:
2528
- name: Checkout
26-
uses: actions/checkout@v3
29+
uses: actions/checkout@v4
2730
- name: Save repo content as artifact
28-
uses: actions/upload-artifact@v3
31+
uses: actions/upload-artifact@v4
2932
with:
3033
name: full-workspace
3134
path: ${{ github.workspace }}
3235
- name: Full Composer Install
33-
run: composer install
36+
run: composer install --dev
3437
- name: Validate Code
3538
run: composer code:lint
3639
- name: Phar Build
@@ -40,7 +43,7 @@ jobs:
4043
export PATH=~/box/vendor/bin:$PATH
4144
composer phar:build
4245
- name: Save terminus.phar as artifact
43-
uses: actions/upload-artifact@v3
46+
uses: actions/upload-artifact@v4
4447
with:
4548
name: terminus-phar
4649
path: terminus.phar
@@ -53,38 +56,46 @@ jobs:
5356
strategy:
5457
matrix:
5558
operating-system: [ 'macos-latest' ]
56-
php-versions: [ '7.4', '8.2', '8.3' ]
59+
php-versions: [ '8.2', '8.4' ]
5760
max-parallel: 1
5861
env:
5962
TERMINUS_TOKEN: ${{ secrets.TERMINUS_TOKEN }}
60-
TERMINUS_SITE: ${{ secrets.TERMINUS_SITE }}
61-
TERMINUS_SITE_WP: ${{ secrets.TERMINUS_SITE_WP }}
62-
TERMINUS_SITE_WP_NETWORK: ${{ secrets.TERMINUS_SITE_WP_NETWORK }}
63-
TERMINUS_ORG: ${{ secrets.TERMINUS_ORG }}
64-
TERMINUS_BASE_DIR: ${{ secrets.TERMINUS_BASE_DIR }}
65-
TERMINUS_PLUGINS_DIR: ${{ secrets.TERMINUS_PLUGINS_DIR }}
66-
TERMINUS_PLUGINS2_DIR: ${{ secrets.TERMINUS_PLUGINS2_DIR }}
67-
TERMINUS_DEPENDENCIES_BASE_DIR: ${{ secrets.TERMINUS_DEPENDENCIES_BASE_DIR }}
63+
TERMINUS_SITE: ${{ vars.TERMINUS_SITE }}
64+
TERMINUS_SITE_WP: ${{ vars.TERMINUS_SITE_WP }}
65+
TERMINUS_SITE_WP_NETWORK: ${{ vars.TERMINUS_SITE_WP_NETWORK }}
66+
TERMINUS_ORG: ${{ vars.TERMINUS_ORG }}
67+
TERMINUS_BASE_DIR: ${{ vars.TERMINUS_BASE_DIR }}
68+
TERMINUS_PLUGINS_DIR: ${{ vars.TERMINUS_PLUGINS_DIR }}
69+
TERMINUS_PLUGINS2_DIR: ${{ vars.TERMINUS_PLUGINS2_DIR }}
70+
TERMINUS_DEPENDENCIES_BASE_DIR: ${{ vars.TERMINUS_DEPENDENCIES_BASE_DIR }}
6871
TERMINUS_USER: ${{ secrets.TERMINUS_USER }}
72+
TERMINUS_HOST: ${{ vars.TERMINUS_HOST }}
73+
TERMINUS_PORT: ${{ vars.TERMINUS_PORT }}
74+
TERMINUS_VERIFY_HOST_CERT: ${{ vars.TERMINUS_VERIFY_HOST_CERT }}
75+
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
76+
HOMBEBREW_NO_AUTO_UPDATE: 1
6977
needs: [ checkout_build ]
7078
steps:
7179
- name: Install SSH key
72-
uses: webfactory/ssh-agent@v0.5.3
80+
uses: webfactory/ssh-agent@v0.9.0
7381
with:
7482
ssh-private-key: ${{ secrets.TERMINUS_SITE_OWNER_SSH_PRIVATE_KEY }}
83+
- run: brew update && brew upgrade icu4c
84+
if: runner.os == 'macOS'
85+
continue-on-error: true
7586
- name: Setup PHP with PECL extension
7687
uses: shivammathur/setup-php@v2
7788
with:
7889
php-version: ${{ matrix.php-versions }}
79-
extensions: gd, mbstring, zip, ssh2-1.3.1, pcov
90+
extensions: gd, mbstring, zip, ssh2-1.4.1, pcov
8091
coverage: pcov
8192
ini-values: error_reporting=E_ALL
8293
- name: Download repo content from artifact
83-
uses: actions/download-artifact@v3
94+
uses: actions/download-artifact@v4
8495
with:
8596
name: full-workspace
8697
- name: Download terminus.phar as artifact
87-
uses: actions/download-artifact@v3
98+
uses: actions/download-artifact@v4
8899
with:
89100
name: terminus-phar
90101
- name: Install Composer Dependencies
@@ -101,14 +112,6 @@ jobs:
101112
- name: Functional Tests (arbitrary group)
102113
if: ${{ github.event.inputs.functional_tests_group != '' && github.event.inputs.functional_tests_group != 'all' }}
103114
run: composer test:group -- ${{ github.event.inputs.functional_tests_group }}
104-
105-
- name: Coverage Report
106-
run: composer coverage
107-
- name: Save coverage as artifact
108-
uses: actions/upload-artifact@v3
109-
with:
110-
name: CoverageReport
111-
path: docs/TestCoverage.md
112115
- name: Finish sesssion
113116
if: ${{ always() && github.event.inputs.tmate_enabled == 1 }}
114117
run: |
@@ -122,12 +125,12 @@ jobs:
122125
runs-on: ubuntu-latest
123126
name: Release
124127
container:
125-
image: quay.io/pantheon-public/php-ci:1.x
128+
image: quay.io/pantheon-public/php-ci:v8.2
126129
needs: [ functional ]
127130
if: ${{ startsWith(github.ref, 'refs/tags/') && github.repository == 'pantheon-systems/terminus' }}
128131
steps:
129132
- name: Download terminus.phar as artifact
130-
uses: actions/download-artifact@v2
133+
uses: actions/download-artifact@v4
131134
with:
132135
name: terminus-phar
133136
- name: Release
@@ -151,112 +154,3 @@ jobs:
151154
tag: ${{github.ref}}
152155
revision: ${{github.sha}}
153156
formula: terminus
154-
155-
package_linux:
156-
runs-on: ubuntu-latest
157-
name: Package .deb Release
158-
container:
159-
image: quay.io/pantheon-public/php-ci:v7.4
160-
if: ${{ startsWith(github.ref, 'refs/tags/') && github.repository_owner == 'pantheon-systems' }}
161-
needs: [ release ]
162-
steps:
163-
- name: Download repo content from artifact
164-
uses: actions/download-artifact@v2
165-
with:
166-
name: full-workspace
167-
- name: Download terminus.phar as artifact
168-
uses: actions/download-artifact@v2
169-
with:
170-
name: terminus-phar
171-
- name: Full Composer Install
172-
run: composer install
173-
- name: Prepare needed folder and fix permissions
174-
run: mkdir -p ~/.terminus/cache/tokens && mv ./terminus.phar ./terminus && chmod +x ./terminus
175-
- name: Passegers, gather ye packages
176-
run: composer bundle:linux
177-
- name: Save terminus deb as artifact
178-
uses: actions/upload-artifact@v2
179-
with:
180-
name: terminus-deb
181-
path: ./*.deb
182-
if-no-files-found: error
183-
184-
publish_linux:
185-
runs-on: ubuntu-latest
186-
name: Publish .deb Release
187-
strategy:
188-
matrix:
189-
# Add needed repositories in the form of <package_name>/<distro>/<version>.
190-
repository:
191-
- 'terminus/debian/buster'
192-
- 'terminus/debian/bullseye'
193-
- 'terminus/debian/bookworm'
194-
- 'terminus/ubuntu/bionic'
195-
- 'terminus/ubuntu/focal'
196-
- 'terminus/ubuntu/groovy'
197-
- 'terminus/ubuntu/hirsute'
198-
- 'terminus/ubuntu/impish'
199-
if: ${{ startsWith(github.ref, 'refs/tags/') && github.repository_owner == 'pantheon-systems' }}
200-
needs: [ 'package_linux' ]
201-
steps:
202-
- name: Download terminus deb as artifact
203-
uses: actions/download-artifact@v2
204-
with:
205-
name: terminus-deb
206-
- uses: docker://lpenz/ghaction-packagecloud:v0.2
207-
with:
208-
user: stovak
209-
repository: ${{ matrix.repository }}
210-
path: |
211-
*.deb
212-
env:
213-
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}
214-
215-
# # NOT CURRENTLY USED
216-
# behat_tests:
217-
# runs-on: ubuntu-latest
218-
# name: Behat Tests
219-
# needs: [ checkout_build ]
220-
# if: ${{ startsWith(github.ref, 'refs/tags/') && github.repository_owner == 'pantheon-systems' }}
221-
# strategy:
222-
# matrix:
223-
# php-versions: [ '7.4', '8.0' ]
224-
# fail-fast: false
225-
# env:
226-
# TERMINUS_VERBOSITY: 22
227-
# TERMINUS_EXECUTABLE: terminus
228-
# TERMINUS_TEST_MODE: 1
229-
# TERMINUS_TOKEN: ${{ secrets.TERMINUS_TOKEN }}
230-
# steps:
231-
# - name: Setup PHP with PECL extension
232-
# uses: shivammathur/setup-php@v2
233-
# with:
234-
# php-version: ${{ matrix.php-versions }}
235-
# extensions: gd, mbstring, zip
236-
# coverage: pcov
237-
# - name: Download repo content from artifact
238-
# uses: actions/download-artifact@v2
239-
# with:
240-
# name: full-workspace
241-
# - name: Download terminus.phar as artifact
242-
# uses: actions/download-artifact@v2
243-
# with:
244-
# name: terminus-phar
245-
# - name: Install Composer Dependencies
246-
# run: composer install --no-interaction --prefer-dist
247-
# - name: Fix permissions
248-
# run: chmod +x ./bin/terminus
249-
# - name: Behat Tests
250-
# run: composer test:behat
251-
252-
# # NOT CURRENTLY USED
253-
# package_macos:
254-
# runs-on: macos-latest
255-
# name: Package a Homebrew release
256-
# if: ${{ startsWith(github.ref, 'refs/tags/') && github.repository_owner == 'pantheon-systems' }}
257-
# needs: [ 'functional_tests', 'behat_tests' ]
258-
# steps:
259-
# - name: Brew Tap Terminus
260-
# run: brew install stovak/terminus/terminus
261-
# - name: Update tap with new release
262-
# run: brew bump-formula-pr --url=${{ steps.tagged.outputs.url }} --no-browse --no-audit --commit stovak/terminus/terminus

0 commit comments

Comments
 (0)