forked from moodlehq/moodle-plugin-ci
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some selfupdate integration tests
We just start with the 4.1.8 release that was the first supporting the selfupdate command. Then we upgrade to actual and then rollback to confirm that we are back to the original one. That should be enough to have it continuously covered.
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -258,3 +258,45 @@ jobs: | |
php build/moodle-plugin-ci.phar phpunit --verbose --coverage-text --fail-on-warning | ||
php build/moodle-plugin-ci.phar behat --profile default | ||
php build/moodle-plugin-ci.phar behat --profile chrome | ||
selfupdatetest: | ||
name: SelfUpdate tests (PHAR) | ||
runs-on: ubuntu-22.04 | ||
env: | ||
lowest_release: '4.1.8' | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
# Each supported PHP version once. That's enough. | ||
- php: '8.2' | ||
- php: '8.1' | ||
- php: '8.0' | ||
- php: '7.4' | ||
|
||
steps: | ||
- name: Setup PHP ${{ matrix.php }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: pgsql, zip, gd, xmlrpc, soap | ||
ini-values: max_input_vars=5000 | ||
coverage: none | ||
|
||
- name: Download base ${{ env.lowest_release }} PHAR artifact | ||
uses: robinraju/[email protected] | ||
with: | ||
repository: moodlehq/moodle-plugin-ci | ||
tag: ${{ env.lowest_release }} | ||
fileName: moodle-plugin-ci.phar | ||
|
||
- name: Self update PHAR to actual | ||
run: | | ||
php moodle-plugin-ci.phar selfupdate | ||
php moodle-plugin-ci.phar --version | grep -qv "${{ env.lowest_release }}" | ||
- name: Rollback PHAR to base ${{ env.lowest_release }} | ||
run: | | ||
php moodle-plugin-ci.phar selfupdate --rollback | ||
php moodle-plugin-ci.phar --version | grep -q "${{ env.lowest_release }}" |