Try to fix mysql for github actions
This commit is contained in:
parent
7d8d12fd30
commit
5f619e4c23
16
.github/workflows/tests.yml
vendored
16
.github/workflows/tests.yml
vendored
@ -33,13 +33,12 @@ jobs:
|
||||
--health-retries 5
|
||||
|
||||
mysql:
|
||||
image: mysql:5.7
|
||||
image: mysql:8.0
|
||||
env:
|
||||
MYSQL_USER: root
|
||||
MYSQL_PASSWORD: ''
|
||||
MYSQL_ALLOW_EMPTY_PASSWORD: yes
|
||||
MYSQL_ROOT_PASSWORD: 'BestPasswordEver'
|
||||
ports:
|
||||
- 3306:3306
|
||||
# will assign a random free host port
|
||||
- 3306/tcp
|
||||
options: >-
|
||||
--health-cmd="mysqladmin ping"
|
||||
--health-interval=10s
|
||||
@ -49,7 +48,7 @@ jobs:
|
||||
steps:
|
||||
- name: Verify MySQL connection from host
|
||||
run: |
|
||||
mysql --host 127.0.0.1 --port 3306 -uroot -e "SHOW DATABASES"
|
||||
mysql --host 127.0.0.1 --port ${{ job.services.mysql.ports[3306] }} -uroot -pBestPasswordEver -e "SHOW DATABASES"
|
||||
if: matrix.db == 'mysql'
|
||||
|
||||
- name: Checkout Redmine
|
||||
@ -99,6 +98,7 @@ jobs:
|
||||
- name: Run Redmine rake tasks
|
||||
env:
|
||||
RAILS_ENV: test
|
||||
MYSQL_PORT: ${{ job.services.mysql.ports[3306] }}
|
||||
working-directory: redmine
|
||||
run: |
|
||||
bundle exec rake generate_secret_token
|
||||
@ -108,14 +108,14 @@ jobs:
|
||||
- name: Run tests
|
||||
env:
|
||||
RAILS_ENV: test
|
||||
REDMINE_VERSION: ${{ matrix.redmine }}
|
||||
MYSQL_PORT: ${{ job.services.mysql.ports[3306] }}
|
||||
working-directory: redmine
|
||||
run: bundle exec rake redmine:plugins:test NAME=additionals RUBYOPT="-W0"
|
||||
|
||||
- name: Run uninstall test
|
||||
env:
|
||||
RAILS_ENV: test
|
||||
REDMINE_VERSION: ${{ matrix.redmine }}
|
||||
MYSQL_PORT: ${{ job.services.mysql.ports[3306] }}
|
||||
working-directory: redmine
|
||||
run: bundle exec rake redmine:plugins:migrate NAME=additionals VERSION=0
|
||||
|
||||
|
@ -1,26 +1,8 @@
|
||||
production:
|
||||
adapter: mysql2
|
||||
database: redmine
|
||||
host: 127.0.0.1
|
||||
port: 3306
|
||||
username: root
|
||||
password:
|
||||
encoding: utf8mb4
|
||||
|
||||
development:
|
||||
adapter: mysql2
|
||||
database: redmine
|
||||
port: 3306
|
||||
host: 127.0.0.1
|
||||
username: root
|
||||
password:
|
||||
encoding: utf8mb4
|
||||
|
||||
test:
|
||||
adapter: mysql2
|
||||
database: redmine
|
||||
port: 3306
|
||||
port: <%= ENV["MYSQL_PORT"] %>
|
||||
host: 127.0.0.1
|
||||
username: root
|
||||
password:
|
||||
password: BestPasswordEver
|
||||
encoding: utf8mb4
|
||||
|
Loading…
Reference in New Issue
Block a user