1- name : Terminus 3 .x
1+ name : Terminus 4 .x
22on :
33 push :
4- schedule :
5- - cron : ' 0 6 * * *'
64 workflow_dispatch :
75 inputs :
86 functional_tests_group :
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+
1720jobs :
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
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