Skip to content

Commit

Permalink
Add pipeline for upgrade from 3.6 to 3.7 testing (#1009)
Browse files Browse the repository at this point in the history
* change output

* try without directory, so it takes the tmpdir

* copy screenshot from tmp to artifact dir

* copy as standard step

* fix path

* fix config

* don't create user that exists

* avoid step failing when no images found

* be less verbose

* update action versions
  • Loading branch information
michield authored Dec 30, 2023
1 parent a125c7a commit 54becd4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
php-version: ['8.1']
experimental: [false]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
php_extensions: xml
version: 2

- name: Report Versions
- name: Report Versions and show ENV vars
run: |
google-chrome --version
lsb_release -a
Expand All @@ -57,6 +57,7 @@ jobs:
vendor/bin/behat -V
mysql --version
mysqladmin --version
export
- name: Create Database
run: |
Expand Down Expand Up @@ -101,9 +102,7 @@ jobs:
- name: Reset Database
run: |
sudo mysql -proot -e 'drop database if exists phplistdb'
sudo mysqladmin -proot create phplistdb
sudo mysql -proot -e 'create user phplist@"%" identified by "phplist"; grant all on phplistdb.* to phplist@"%"'
sudo mysql -proot -e 'drop database if exists phplistdb; create database phplistdb;'
- name: Run BDD Tests UI
run: |
Expand All @@ -120,11 +119,19 @@ jobs:
export ADMIN_NAME="phpList Administrator"
php public_html/lists/admin/index.php -c $GITHUB_WORKSPACE/public_html/lists/config/config.php -p initialise -f
cd $GITHUB_WORKSPACE/tests
../vendor/bin/behat -p chrome --tags="~@initialise && ~@wip"
../vendor/bin/behat -p chrome -f progress --tags="~@initialise && ~@wip"
- name: copy screenshots
if: always()
run: |
cd $GITHUB_WORKSPACE
images=$(ls -l /tmp/*.png 2>/dev/null | wc -l)
[[ $images -gt 0 ]] && cp -v /tmp/*.png output/screenshots
exit 0;
- name: Upload the screenshots
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
path: "output"
name: "behat output ${{ matrix.php-version }}"
Expand Down
1 change: 0 additions & 1 deletion tests/ci/behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ default:
wd_host: http://127.0.0.1:4444/wd/hub
FailAid\Extension:
screenshot:
directory: ./output/screenshots/
mode: default
autoClean: false
size: 1444x1280
Expand Down
Binary file modified tests/phplist-3.6.sql.gz
Binary file not shown.

0 comments on commit 54becd4

Please sign in to comment.