mirror of
https://github.com/slawkens/myaac.git
synced 2026-01-18 20:26:22 +01:00
Add tfs-0.3 to github workflow cypress
This commit is contained in:
43
.github/workflows/cypress.yml
vendored
43
.github/workflows/cypress.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
php-versions: [ '8.1', '8.2', '8.3', '8.4', '8.5' ]
|
php-versions: [ '8.1', '8.2', '8.3', '8.4', '8.5' ]
|
||||||
ots: ['tfs-1.4', 'canary-3.1.2'] # TODO: add 'tfs-master' (actually doesn't work cause AAC doesn't support reading .env configuration)
|
ots: ['tfs-1.4', 'canary-3.1.2', 'tfs-0.3'] # TODO: add 'tfs-master' (actually doesn't work cause AAC doesn't support reading .env configuration)
|
||||||
name: Cypress (PHP ${{ matrix.php-versions }}, ${{ matrix.ots }})
|
name: Cypress (PHP ${{ matrix.php-versions }}, ${{ matrix.ots }})
|
||||||
steps:
|
steps:
|
||||||
- name: 📌 MySQL Start & init & show db
|
- name: 📌 MySQL Start & init & show db
|
||||||
@@ -58,6 +58,14 @@ jobs:
|
|||||||
ref: master
|
ref: master
|
||||||
path: ots
|
path: ots
|
||||||
|
|
||||||
|
- name: Checkout TFS 0.3
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
if: matrix.ots == 'tfs-0.3'
|
||||||
|
with:
|
||||||
|
repository: otland/tfs-old-svn
|
||||||
|
ref: 0.3
|
||||||
|
path: ots
|
||||||
|
|
||||||
- name: Checkout Canary
|
- name: Checkout Canary
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
if: matrix.ots == 'canary-3.1.2'
|
if: matrix.ots == 'canary-3.1.2'
|
||||||
@@ -67,9 +75,15 @@ jobs:
|
|||||||
path: ots
|
path: ots
|
||||||
|
|
||||||
- name: Import OTS Schema
|
- name: Import OTS Schema
|
||||||
|
if: matrix.ots != 'tfs-0.3'
|
||||||
run: |
|
run: |
|
||||||
mysql -uroot -proot myaac < ots/schema.sql
|
mysql -uroot -proot myaac < ots/schema.sql
|
||||||
|
|
||||||
|
- name: Import OTS Schema (TFS 0.3)
|
||||||
|
if: matrix.ots == 'tfs-0.3'
|
||||||
|
run: |
|
||||||
|
mysql -uroot -proot myaac < ots/schemas/mysql.sql
|
||||||
|
|
||||||
- name: Rename config.lua
|
- name: Rename config.lua
|
||||||
run: mv ots/config.lua.dist ots/config.lua
|
run: mv ots/config.lua.dist ots/config.lua
|
||||||
|
|
||||||
@@ -109,6 +123,33 @@ jobs:
|
|||||||
regex: false
|
regex: false
|
||||||
include: 'ots/config.lua'
|
include: 'ots/config.lua'
|
||||||
|
|
||||||
|
- name: Replace mysqlPass (TFS 0.3.6pl1)
|
||||||
|
uses: jacobtomlinson/gha-find-replace@v3
|
||||||
|
if: matrix.ots == 'tfs-0.3'
|
||||||
|
with:
|
||||||
|
find: 'sqlType = "sqlite"'
|
||||||
|
replace: 'sqlType = "mysql"'
|
||||||
|
regex: false
|
||||||
|
include: 'ots/config.lua'
|
||||||
|
|
||||||
|
- name: Replace mysqlPass (TFS 0.3.6pl1)
|
||||||
|
uses: jacobtomlinson/gha-find-replace@v3
|
||||||
|
if: matrix.ots == 'tfs-0.3'
|
||||||
|
with:
|
||||||
|
find: 'sqlPass = ""'
|
||||||
|
replace: 'sqlPass = "root"'
|
||||||
|
regex: false
|
||||||
|
include: 'ots/config.lua'
|
||||||
|
|
||||||
|
- name: Replace mysqlDatabase (Canary)
|
||||||
|
uses: jacobtomlinson/gha-find-replace@v3
|
||||||
|
if: matrix.ots == 'tfs-0.3'
|
||||||
|
with:
|
||||||
|
find: 'sqlDatabase = "theforgottenserver"'
|
||||||
|
replace: 'sqlDatabase = "myaac"'
|
||||||
|
regex: false
|
||||||
|
include: 'ots/config.lua'
|
||||||
|
|
||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user