Skip to content

Commit 9f65bb6

Browse files
authored
Merge pull request #389 from gtt-project/ci/runner-native-tests
ci: run the test matrix on the runner natively, not in a Debian container
2 parents b16fe28 + 6318673 commit 9f65bb6

2 files changed

Lines changed: 23 additions & 30 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Set up Node
2828
uses: actions/setup-node@v6
2929
with:
30-
node-version: 22
30+
node-version: 24
3131

3232
- name: Build assets
3333
env:

.github/workflows/test-postgis.yml

Lines changed: 22 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ jobs:
4545
name: redmine:${{ matrix.redmine_version }} ruby:${{ matrix.ruby_version }} postgis:${{ matrix.db_version }}
4646
runs-on: ubuntu-latest
4747

48-
container:
49-
image: ruby:${{ matrix.ruby_version }}-bullseye
50-
5148
strategy:
5249
fail-fast: false
5350
matrix:
@@ -94,36 +91,32 @@ jobs:
9491
with:
9592
path: redmine/plugins/${{ env.PLUGIN_NAME }}
9693

97-
- name: Update package archives
98-
run: apt-get update --yes --quiet
94+
- name: Set up Ruby
95+
uses: ruby/setup-ruby@v1
96+
with:
97+
ruby-version: ${{ matrix.ruby_version }}
9998

100-
- name: Install package dependencies
101-
run: |
102-
apt-get install --yes --quiet \
103-
postgresql-client \
104-
gcc libpq-dev make patch libgeos-dev curl
105-
# For system test
106-
if [ ${{ matrix.system_test }} = "true" ]; then
107-
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
108-
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
109-
apt-get -y update
110-
apt-get install -y google-chrome-stable
111-
fi
99+
- name: Set up Node
100+
uses: actions/setup-node@v6
101+
with:
102+
node-version: 24
112103

113-
- name: Install Node and pnpm
104+
- name: Install native gem system libraries
105+
# The runner image ships gcc/make/patch and Chrome (for the system
106+
# test); only the pg and rgeo-geos gems' headers still need apt, which
107+
# here hits Ubuntu's mirrors rather than a Debian container's.
114108
run: |
115-
curl -sL https://deb.nodesource.com/setup_24.x | bash -
116-
apt-get install --yes --quiet --no-install-recommends nodejs
117-
# corepack picks the pnpm version pinned in package.json
118-
corepack enable pnpm
109+
sudo apt-get update --yes --quiet
110+
sudo apt-get install --yes --quiet --no-install-recommends libpq-dev libgeos-dev
119111
120-
- name: Prepare Plugin
121-
working-directory: redmine/plugins/redmine_gtt
112+
- name: Build plugin assets
113+
working-directory: redmine/plugins/${{ env.PLUGIN_NAME }}
122114
env:
123115
COREPACK_ENABLE_DOWNLOAD_PROMPT: "0"
124116
# typecheck + unit tests run once in the frontend job; here we only
125117
# build the assets the Ruby tests need.
126118
run: |
119+
corepack enable pnpm
127120
pnpm install --frozen-lockfile
128121
pnpm build
129122
@@ -134,7 +127,7 @@ jobs:
134127
test:
135128
adapter: postgis
136129
database: redmine
137-
host: postgres
130+
host: 127.0.0.1
138131
username: postgres
139132
password: postgres
140133
encoding: utf8
@@ -171,11 +164,11 @@ jobs:
171164
GOOGLE_CHROME_OPTS_ARGS: "headless,disable-gpu,no-sandbox,disable-dev-shm-usage"
172165
working-directory: redmine
173166
run: |
174-
bundle exec rails test plugins/redmine_gtt/test/unit
175-
bundle exec rails test plugins/redmine_gtt/test/functional
176-
bundle exec rails test plugins/redmine_gtt/test/integration
167+
bundle exec rails test plugins/${{ env.PLUGIN_NAME }}/test/unit
168+
bundle exec rails test plugins/${{ env.PLUGIN_NAME }}/test/functional
169+
bundle exec rails test plugins/${{ env.PLUGIN_NAME }}/test/integration
177170
if [ ${{ matrix.system_test }} = "true" ]; then
178-
bundle exec rails test plugins/redmine_gtt/test/system
171+
bundle exec rails test plugins/${{ env.PLUGIN_NAME }}/test/system
179172
fi
180173
181174
- name: Run uninstall test

0 commit comments

Comments
 (0)