Skip to content

Commit

Permalink
cypress-workflow: config.lua move + replace values
Browse files Browse the repository at this point in the history
  • Loading branch information
slawkens committed May 26, 2023
1 parent d911b55 commit 80af2cd
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions .github/workflows/cypress.yml
Expand Up @@ -14,7 +14,9 @@ jobs:
env:
MYSQL_ALLOW_EMPTY_PASSWORD: false
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: myaac-tfs-latest
MYSQL_DATABASE: myaac-tfs
MYSQL_USER: myaac
MYSQL_PASSWORD: myaac
ports:
- 3306/tcp
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
Expand All @@ -35,6 +37,33 @@ jobs:
ref: 1.4
path: tfs

- name: Rename config.lua
run: mv tfs/config.lua.dist tfs/config.lua

- name: Replace mysqlUser
uses: jacobtomlinson/gha-find-replace@v2
with:
find: 'mysqlUser = "forgottenserver"'
replace: 'mysqlUser = "myaac"'
regex: false
include: 'config.lua'

- name: Replace mysqlPassword
uses: jacobtomlinson/gha-find-replace@v2
with:
find: 'mysqlPassword = ""'
replace: 'mysqlPassword = "myaac"'
regex: false
include: 'config.lua'

- name: Replace mysqlDatabase
uses: jacobtomlinson/gha-find-replace@v2
with:
find: 'mysqlDatabase = "forgottenserver"'
replace: 'mysqlDatabase = "myaac-tfs-latest"'
regex: false
include: 'config.lua'

- run: ls -lha
- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down Expand Up @@ -65,7 +94,7 @@ jobs:
uses: cypress-io/github-action@v5
env:
CYPRESS_URL: http://localhost:8080
CYPRESS_SERVER_PATH: /home/runner/work/myaac/myaac/tfs
CYPRESS_SERVER_PATH: tfs

- name: Save screenshots
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit 80af2cd

Please sign in to comment.