mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
Cypress test on canary + tfs-master
This commit is contained in:
parent
9f3231fff6
commit
a59f0e9244
36
.github/workflows/cypress.yml
vendored
36
.github/workflows/cypress.yml
vendored
@ -23,6 +23,7 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php-versions: [ '8.1', '8.2', '8.3' ]
|
||||
ots: ['tfs-master', 'tfs-1.4', 'canary-3.1.2']
|
||||
name: MyAAC on PHP ${{ matrix.php-versions }}
|
||||
steps:
|
||||
- name: 📌 MySQL Start & init & show db
|
||||
@ -38,17 +39,34 @@ jobs:
|
||||
|
||||
- name: Checkout TFS
|
||||
uses: actions/checkout@v4
|
||||
if: matrix.ots == 'tfs-1.4'
|
||||
with:
|
||||
repository: otland/forgottenserver
|
||||
ref: 1.4
|
||||
path: tfs
|
||||
path: ots
|
||||
|
||||
- name: Import TFS Schema
|
||||
- name: Checkout TFS
|
||||
uses: actions/checkout@v4
|
||||
if: matrix.ots == 'tfs-master'
|
||||
with:
|
||||
repository: otland/forgottenserver
|
||||
ref: master
|
||||
path: ots
|
||||
|
||||
- name: Checkout Canary
|
||||
uses: actions/checkout@v4
|
||||
if: matrix.ots == 'canary-3.1.2'
|
||||
with:
|
||||
repository: opentibiabr/canary
|
||||
ref: v3.1.2
|
||||
path: ots
|
||||
|
||||
- name: Import OTS Schema
|
||||
run: |
|
||||
mysql -uroot -proot myaac < tfs/schema.sql
|
||||
mysql -uroot -proot myaac < ots/schema.sql
|
||||
|
||||
- name: Rename config.lua
|
||||
run: mv tfs/config.lua.dist tfs/config.lua
|
||||
run: mv ots/config.lua.dist ots/config.lua
|
||||
|
||||
- name: Replace mysqlUser
|
||||
uses: jacobtomlinson/gha-find-replace@v2
|
||||
@ -56,7 +74,7 @@ jobs:
|
||||
find: 'mysqlUser = "forgottenserver"'
|
||||
replace: 'mysqlUser = "root"'
|
||||
regex: false
|
||||
include: 'tfs/config.lua'
|
||||
include: 'ots/config.lua'
|
||||
|
||||
- name: Replace mysqlPass
|
||||
uses: jacobtomlinson/gha-find-replace@v2
|
||||
@ -64,7 +82,7 @@ jobs:
|
||||
find: 'mysqlPass = ""'
|
||||
replace: 'mysqlPass = "root"'
|
||||
regex: false
|
||||
include: 'tfs/config.lua'
|
||||
include: 'ots/config.lua'
|
||||
|
||||
- name: Replace mysqlDatabase
|
||||
uses: jacobtomlinson/gha-find-replace@v2
|
||||
@ -72,7 +90,7 @@ jobs:
|
||||
find: 'mysqlDatabase = "forgottenserver"'
|
||||
replace: 'mysqlDatabase = "myaac"'
|
||||
regex: false
|
||||
include: 'tfs/config.lua'
|
||||
include: 'ots/config.lua'
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
@ -91,7 +109,7 @@ jobs:
|
||||
# Use composer.json for key, if composer.lock is not committed.
|
||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||
#key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: ${{ runner.os }}-composer-
|
||||
restore-keys: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||
|
||||
- name: Install Composer dependencies
|
||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||
@ -103,7 +121,7 @@ jobs:
|
||||
uses: cypress-io/github-action@v6
|
||||
env:
|
||||
CYPRESS_URL: http://localhost:8080
|
||||
CYPRESS_SERVER_PATH: /home/runner/work/myaac/myaac/tfs
|
||||
CYPRESS_SERVER_PATH: /home/runner/work/myaac/myaac/ots
|
||||
|
||||
- name: Save screenshots
|
||||
uses: actions/upload-artifact@v4
|
||||
|
Loading…
x
Reference in New Issue
Block a user