Skip to content

Commit 8d76fca

Browse files
committed
Using new ruby 3.1 image.
1 parent 95ddb29 commit 8d76fca

File tree

1 file changed

+28
-5
lines changed

1 file changed

+28
-5
lines changed

.gitlab-ci.yml

+28-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,33 @@
11
---
2-
image: circleci/ruby:3.0.3-node-browsers
2+
image: "ruby:3.1"
33

44
variables:
5+
RAILS_ENV: test
56
CACHE_FALLBACK_KEY: "$CI_COMMIT_REF_SLUG"
67

78
before_script:
9+
# Setup Node.js
10+
- curl -fsSL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh
11+
- bash nodesource_setup.sh
12+
- apt-get install -y nodejs
13+
14+
# Install Yarn
15+
- npm config set registry https://registry.npmmirror.com/ --global
16+
- npm install --global yarn
17+
18+
# Verify installations
19+
- node -v
20+
- yarn -v
21+
- ruby -v
22+
- which ruby
23+
24+
# Setup Bundler
25+
- gem install bundler --no-document
826
- bundle config set path 'vendor' # Install dependencies into ./vendor/ruby
27+
- bundle install --jobs $(nproc)
28+
29+
# Install JavaScript dependencies
30+
- yarn install --cache-folder .yarn-cache
931

1032
stages:
1133
- test
@@ -22,12 +44,13 @@ test:
2244
files:
2345
- yarn.lock
2446
paths:
25-
- ".yarn-cache/"
47+
- .yarn-cache/
2648
script:
27-
- bundle install -j $(nproc)
28-
- yarn install --cache-folder .yarn-cache
49+
- bundle exec standardrb
2950
- bin/rails db:drop RAILS_ENV=test
3051
- bin/rails db:setup RAILS_ENV=test
31-
- bundle exec standardrb
3252
- bin/rails test
3353
- bin/rails test:system
54+
only:
55+
- main
56+
- merge_requests

0 commit comments

Comments
 (0)