@@ -60,97 +60,45 @@ jobs:
60
60
with :
61
61
path : redmine/plugins/${{ env.PLUGIN_NAME }}
62
62
63
- - name : Update package archives
64
- run : apt-get update --yes --quiet
65
-
66
- - name : Install package dependencies
67
- run : |
68
- apt-get install --yes --quiet \
69
- postgresql-client \
70
- gcc libpq-dev make patch libgeos-dev curl
71
- # For system test
72
- if [ ${{ matrix.system_test }} = "true" ]; then
73
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
74
- sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
75
- apt-get -y update
76
- apt-get install -y google-chrome-stable
77
- fi
78
-
79
- - name : Install Node/Yarn packages
80
- run : |
81
- curl -sL https://deb.nodesource.com/setup_20.x | bash -
82
- curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
83
- echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
84
- apt-get update --yes --quiet
85
- apt-get install --yes --quiet --no-install-recommends nodejs yarn
63
+ - name : Setup Environment
64
+ run : ./setup_environment.sh
86
65
87
66
- name : Prepare Plugin
88
- working-directory : redmine/plugins/redmine_gtt
89
- run : |
90
- yarn
91
- npx webpack
67
+ working-directory : redmine/plugins/${{ env.PLUGIN_NAME }}
68
+ run : ./prepare_plugin.sh
92
69
93
70
- name : Prepare Redmine source
94
71
working-directory : redmine
95
- run : |
96
- cat <<EOF > config/database.yml
97
- test:
98
- adapter: postgis
99
- database: redmine
100
- host: postgres
101
- username: postgres
102
- password: postgres
103
- encoding: utf8
104
- EOF
72
+ run : ./prepare_redmine.sh
105
73
106
74
- name : Adjust Gem environment
107
- run : |
108
- case "${{ matrix.redmine_version }}" in
109
- master)
110
- echo "GEM_ACTIVERECORD_POSTGIS_ADAPTER_VERSION=9.0.1" >> ${GITHUB_ENV}
111
- ;;
112
- esac
75
+ run : ./adjust_gem_env.sh
113
76
114
77
- name : Install Ruby dependencies
115
78
working-directory : redmine
116
- run : |
117
- bundle config set --local without 'development'
118
- bundle install --jobs=4 --retry=3
79
+ run : ./install_ruby_dependencies.sh
119
80
120
81
- name : Run Redmine rake tasks
121
82
env :
122
83
RAILS_ENV : test
123
84
working-directory : redmine
124
- run : |
125
- bundle exec rake generate_secret_token
126
- bundle exec rake db:create db:migrate redmine:plugins:migrate
85
+ run : ./run_rake_tasks.sh
127
86
128
87
- name : Zeitwerk check
129
88
env :
130
89
RAILS_ENV : test
131
90
working-directory : redmine
132
- run : |
133
- if grep -q zeitwerk config/application.rb ; then
134
- bundle exec rake zeitwerk:check
135
- fi
136
- shell : bash
91
+ run : ./zeitwerk_check.sh
137
92
138
93
- name : Run tests
139
94
env :
140
95
RAILS_ENV : test
141
- # For system test in plugin
142
96
GOOGLE_CHROME_OPTS_ARGS : " headless,disable-gpu,no-sandbox,disable-dev-shm-usage"
143
97
working-directory : redmine
144
- run : |
145
- bundle exec rake redmine:plugins:test:units NAME=${{ env.PLUGIN_NAME }} RUBYOPT="-W0"
146
- bundle exec rake redmine:plugins:test:functionals NAME=${{ env.PLUGIN_NAME }} RUBYOPT="-W0"
147
- bundle exec rake redmine:plugins:test:integration NAME=${{ env.PLUGIN_NAME }} RUBYOPT="-W0"
148
- if [ ${{ matrix.system_test }} = "true" ]; then
149
- bundle exec rake redmine:plugins:test:system NAME=${{ env.PLUGIN_NAME }} RUBYOPT="-W0"
150
- fi
98
+ run : ./run_tests.sh
151
99
152
100
- name : Run uninstall test
153
101
env :
154
102
RAILS_ENV : test
155
103
working-directory : redmine
156
- run : bundle exec rake redmine:plugins:migrate NAME=${{ env.PLUGIN_NAME }} VERSION=0
104
+ run : ./run_uninstall_test.sh
0 commit comments